In a statement, The New York Times said an agreement had been reached with Banco Inbursa and Inmobiliaria Carso, with each company contributing half of the $250m.
Slim is the main shareholder for Banco Inbursa's parent company Grupo Financiero Inbursa, and also owns Inmobiliaria Carso, which already holds a 6.9% stake in The New York Times Company.
Under the agreement the $250m six-year loan is convertible into an additional 15.9m Class A shares, at a price of $6.35 each, which increases his company stake to 17%.
Slim will receive no representation on the company's board or any shares with special voting rights like those of the Sulzberger family, which controls the company.
The Sulzberger family members own about 19% of the company and control it with a special class of voting shares.
Janet L Robinson, chief executive of The New York Times Company, said: "This agreement provides us with increased financial flexibility to continue to execute on our long-term strategy.
"The proceeds from this transaction will be used to refinance existing debt, including amounts currently borrowed under a revolving credit facility that matures in May 2009."
The company needs $400m to pay off its debt due in May with $100m in bonds due later in the year. A further $250m will come due in 2010, and another $400m credit facility expires in 2011.
The company currently holds $46m in cash and is trying to raise more money by selling its minority stake in the Boston Red Sox baseball team and through a leaseback agreement on its new headquarters in New York.
Slim owns Latin American mobile phone giant America Movil and landline phone company Telefonos de Mexico. He also holds investments in retailing, construction, banking, insurance, railroads and mining.