The 35-year-old, who was not named by police, had approached two female officials at the Göppingen district office near Stuttgart and showed them the asylum rejection letter.
“The officials agreed to help him. But the man became aggressive,” said police in a statement.
“He took a bottle from his backpack and doused himself with the liquid,” they added.
As the officials rushed to seek help, the man “went up in flames”, police said.
Another official quickly put out the flames with a cloth, but the Iranian man suffered severe burns and was taken to hospital by rescue helicopter.
Some 1.2 million asylum seekers have come to Europe's biggest economy since 2015, more than half from war-torn Syria, Iraq and Afghanistan.
Amid rising disquiet among many Germans over the huge influx, the government has been battling to bring down the number of new arrivals.