Actually 4140 steel is neither carbon steel nor stainless steel. AISI 4140 steel is one kind of alloy steel in ASTM standard A29 or A331 or A108 spec. 

To tell one steel is stainless or not, we can see the chemical composition. Stainless steel usually contains min 13% chromium, less than 1.2% carbon and other alloying elements. While stainless steel’s corrosion resistance and mechanical properties can be further enhanced by adding other elements, such as nickel, molybdenum, titanium, niobium, manganese, etc.

AISI 4140 steel contains 0.80-1.10% chromium, so you can see 4140 steel is not stainless steel.

Is 4140 Steel Stainless (1)