Flies were landing on food in the shop and there was an "awful smell"
A fast food shop owner was found preparing food while an employee's corpse lay nearby.
Police called to the Pappu Sweet Centre in Wolverhampton in August discovered the man's body on a sofa near the kitchen, magistrates in the city heard.
The business, owned by Jaswinder Singh, 45, was shut down immediately.
The council said it was one of the worst cases environmental health officers had seen. Mr Singh has been banned from running any food business.
The man's death was not suspicious, police said.
Wolverhampton Magistrates' Court heard about a long list of hygiene breaches at the Cannock Road shop.
The court was told that on 27 August a police officer had been called to a report of a dead man there.
A statement of facts, read out to the court, said: "Upon his arrival the officer observed a dead male lying on a sofa at the rear of the main kitchen.
"Sat opposite to him was Mr Singh who was preparing food, making kebabs."
Inside the Pappu Sweet Centre kebab shop
The court also heard that in a nearby room were a large number of flies which were landing on food.
There was also an "awful smell", thawing meat which was oozing blood and covered in flies, and a man smoking and spitting on the filthy floor.
Environmental health officers had been visiting the shop since October 2007, the court heard.
Environmental Heath officers found a dead rat under a cooking pot
During an earlier visit, officers noted a number of rat droppings and then found a dead rat underneath a cooking pot which had just been laid against a wall to dry.
Mr Singh admitted a string of hygiene offences and was ordered to pay nearly £4,000 in fines and costs.
A spokeswoman for West Midlands Police said the death had not been found to be suspicious and no further action had been taken over the matter.
Councillor Barry Findlay, Wolverhampton City Council's cabinet member for the environment, said the council would not tolerate the public being put at risk.
"We are pleased that the council's actions have resulted in the courts banning this individual from ever running a food business again," he said.
The shop is now under new management.