Garage workers in Kelty in Fife called out animal charity the Scottish SPCA after they discovered the 2ft (0.6m) corn snake in the engine of the Fiat Punto they were working on.
The reptile, which has been named Punto, is now being looked after at the Edinburgh and Lothians Animal Rescue and Rehoming Centre in Balerno.
Scottish SPCA staff were called out to North Road Garage in Kelty on Saturday after the surprise discovery.
Animal rescue officer Stacey Jamieson said, "The mechanics got a bit of a shock when they opened the bonnet and found Punto.
"He would have been attracted by the heat so it would have seemed like a good place to take a rest.
"Thankfully, he was discovered before the car was driven as this could have led to him coming to serious harm."
She added: "I'm not sure where Punto came from but there's a sewage works next to the garage so it's possible he got into a pipe somewhere and has been surviving on sewer mice since then.
"Punto is a lovey wee snake and it would be great to reunite him with his owner if he has gone missing. If no-one comes forward for Punto we'll find him a new home."