The car owner contacted the AA after the cub was seen darting under a wheel arch and up into the engine bay of the Audi SQ5.
Patrolman Jason Robertson spotted a dangling leg and was able to pull the animal - which had made its way into the gearbox - free.
The cub, now named Basset, was unhurt.
He is being looked after by staff at the Scottish SPCA's wildlife rescue centre in Fishcross.
Mr Robertson, who has worked for the AA since 2006, said: "When I saw the job come up with 'fox in engine bay' I feared the worst. I thought maybe it had been hit and I would be arriving at quite a gruesome scene, but I was pleasantly surprised to find that wasn't the case.
"The SSPCA were there but had been unable to find the fox. We tried to coax it out with cat food but when that didn't work, I jacked the car up and saw one of the cub's legs dangling down. Luckily, it was pulled out unscathed.
"I've rescued plenty of kids from locked cars, but this was definitely a first for me."
Scottish SPCA centre manager Colin Seddon said: "Basset appeared unharmed and is doing well now. We'll keep him in our care until the summer when he'll be released back into the wild with a number of other fox cubs at a carefully selected site."

Southern Water said the pipe burst in Chestnut Avenue had affected homes in the SO53 and SO16 postcodes leaving them with no water or low pressure.
The company said supplies would gradually return to normal later as the main was being repaired.
Chestnut Avenue is expected to remain closed until Friday as the burst had caused substantial damage.
Engineers have closed off the road between the Bournemouth Road junction and the Tollgate junction.

Bethany Haines also told ITV News that she hoped her father's body would be returned to his family.
Mr Haines, who was born in Yorkshire and educated in Perth, was killed by IS earlier this month.
He had been taken hostage while carrying out aid work with refugees in Syria.
Mr Haines had been living in Croatia with his second wife, who is Croatian, and their four-year-old daughter. His parents live in Ayr.
His older daughter Bethany gave her television interview from her home in Scotland as MPs prepare to vote on military action against IS.
The 17-year-old said: "IS need to be eradicated. They can't continue this way. They can't be doing this to people and get away with it. No matter what nationality, if they are Western or not.
"Hundreds of Syrians have been killed by them. They need to be stopped. If airstrikes and ground force is what it takes, that's what it takes."
Ms Haines said her family had been touched and moved by the messages of support they had received.
She added: "Anyone who needed help he was there. Tragically he's lost his life doing what he loved but he wouldn't have stopped. Even if he'd come back after this he would've gone out again and again and again. He loved helping people.
"He was such a bright character. Always making people laugh, telling jokes. He was a brilliant man. And he will be remembered like that by everyone who knew him and probably by people who didn't know him.
"He will be remembered and not for the way he was shown in that video. But for the truly amazing work he did and the bright character he was."
Bethany Haines said her father's commitment to helping others had encouraged her to follow his example.
"I'm hoping to do some aid work after next year and do a bit of work with a charity," she said.
"Hopefully it will spark a career doing that. He'd tell me of all the people he'd helped and I want to do that too."
A fox cub is recovering at an animal centre after being rescued from the gear box of a car in Aberdeen by an AA patrolman.
[NEXT_CONCEPT]
A burst water main in Eastleigh has caused flooding in a road and left about 4,000 homes without water.
[NEXT_CONCEPT]
The daughter of David Haines, who was killed by Islamist militants, has said the Islamic State (IS) group should be "eradicated".