The government said prosecutors recommended the cancellation because the race was "not in the best interest of society," and there was a "clear inversion in the priorities for public spending."
The government agency in charge of the event in the Brazilian capital of Brasilia said prosecutors also pointed to problems in the contracts signed by the previous administration and promoters of the March 8 race at the Nelson Piquet Autodromo, which had already sold two-thirds of the tickets.
The contracts required spending nearly $100 million just to renovate the track, the government said.
Brasilia is in the midst of a serious financial crisis, and the government has been unable to pay salaries to many public workers. The newly elected district governor had already relinquished the right to host the 2019 Universiade, a multi-sport event involving thousands of university students from around the world. A MotoGP race originally scheduled for this year also had to be cancelled.
"While all efforts are underway to organize an event not essential to the society of the federal district, public employees are not getting paid," public prosecutors wrote in their recommendation to cancel the race.
Brasilia was one of the 12 World Cup host cities last year, and its stadium, the Estadio Nacional, was deemed the most expensive of those built or renovated for the football tournament.
IndyCar said on Thursday it was caught by surprise by the cancellation. It called the announcement a "great disappointment," but said it was "economically protected from such action."
The government admitted there was a $27 million fine for a breach of contract, but said it was valid only for the contract between IndyCar and the Brazilian network promoting the race, Band TV.
The network released a brief statement lamenting the "hasty" cancellation, and said it would begin advising fans how to reimburse their tickets. Prices started at about $27.
The government agency claimed the decision was not unilateral, and that it tried to re-work the contracts to make sure the race went ahead.
Band was responsible for the series' return to Brazil in 2010, when it raced on a street circuit in Sao Paulo for four consecutive years. The network was not able to secure the event in 2014 because of financial problems, but it reached a partnership with the previous government in Brasilia to organize the race this year.
The contract with Brasilia runs to 2019. Organizers said work at the track was almost finalized.
The Brazilian auto racing confederation lamented the cancellation, and said it hoped the renovation at the Brasilia track would continue despite the decision.
"Without a doubt, we are missing the opportunity to see a great event in Brazil," confederation president Cleyton Pinteiro said.
Follow Tales Azzoni at http://twitter.com/tazzoni