Slim, who has an estimated net worth of $60bn according to Forbes magazine, bought 9.1m shares.
The holding was revealed in a regulatory filing with the US Securities and Exchange Commission but the amount Slim paid was not disclosed.
The Mexican tycoon bought a 1% stake in Independent News & Media, publisher of The Independent newspaper, in May this year.
He is reported to have said the reason for the acquisition is "financial" and not a bridgehead for a move into the newspaper industry.
Slim gained his fortune through ownership of Mexico's main telecoms operator Telmex. He also owns America Movil, Latin America's largest mobile phone company, and has major investments in construction, retail, banking, insurance, mining and railroads.
He is the second major new investor in The New York Times Company this year.
Hedge funds Harbinger Capital and Firebrand Partners together bought just over 20% of the company's Class A stock and secured two seats on its board in April with the aim of changing its business strategy. The shareholding is equal to the Ochs-Sulzberger family, which controls the company through a special class of shares.
The New York Times Company's stock has been falling in recent years due to a decrease in advertising and circulation revenues.
Its share price closed on Wednesday at $13.96 a share, down 4 cents; only three years ago the company's stock traded at more than $40 a share.
The New York Times Company publishes The New York Times and The Boston Globe.