The 1,860 kilometre (1,155 mile) railway is a key route for copper exports from Zambia and neighbouring Democratic Republic of Congo to Tanzania's main port of Dar es Salaam.
The capital infusion from the two state shareholders is expected to provide a lifeline to the loss-making company, Tanzania-Zambia Railway Authority (TAZARA).
"The governments of Tanzania and Zambia ... have agreed to inject 80 million dollars into the operations of TAZARA in the next 12 months, of which 9.2 million dollars is to be disbursed immediately to cater for two months of outstanding employees' salary arrears and some working capital," company spokesman Conrad Simuchile said in a statement.
(WATCH VIDEO: Investment in Zambia's railway sector)
The railway firm has been hit by frequent work stoppages due to on-off strikes by workers over unpaid salaries. Simuchile said the capital injections were also needed to buy fuels and lubricants for the trains.
The Chinese-built railway has suffered from falling cargo traffic as well as years of inadequate investment by the two shareholders.
The company said in September that revenue had averaged 1.53 million dollars per month over the past eight months against an estimated average expenditure exceeding 2.5 million dollars, of which salaries alone constituted an average of 1.3 million dollars.