An accountant had been suspended for being part of the plan to take money collected for earthquake victims, John Magufuli's office added in a statement.
At least 16 people died and 200 were wounded in the 10 September earthquake in the northern Kagera region.
Foreign governments have donated money to the earthquake fund.
On Tuesday, India's government donated 545m Tanzanian shillings ($250,000; Â£190,000) towards the fund, Tanzania's privately owned Citizen newspaper reports.
The two dismissed officials had opened a bank account which "bears the same name as the one opened by the government," the statement said.
The two, along with the suspended official, intended to "use the account to collect money for their benefit while it was meant to help the victims" of the earthquake.
Amantius Msole, Kagera's regional administrative secretary, and Steven Makonda, Bukoba city municipal council director, were fired while accountant Simbaufoo Swai had been suspended, local media reports.
The three have not yet commented on the allegations.
The  magnitude 5.7 earthquake caused significant damage to buildings in Bukoba, a city of more than 70,000 people where most casualties were reported.
Tremors were felt as far away as western Kenya.
East Africa's Great Rift Valley runs along a geological fault line but major earthquakes there are rare.
A magnitude six quake struck the Tanzanian town of Arusha, east of Bukoba, in July 2007.
Tanzania's president has sacked two senior officials for opening a fake account to siphon money from an earthquake fund, his office has said.