The Italian, who has served the car company and Formula One team for more than two decades, indicated his decision was prompted by the flotation plans of the Prancing Horse's parent company the Fiat Chrysler Group.
Di Montezemolo, 67, is expected to be replaced by Sergio Marchionne, chief executive of parent company Fiat.
"This is the end of an era and so I have decided to leave my position as chairman after almost 23 marvellous and unforgettable years, in addition to those spent at Enzo Ferrari's side in the 1970s," Di Montezemolo said.
"Ferrari is the most wonderful company in the world. It has been a great privilege and honour to have been its leader.
"Ferrari will have an important role to play within the FCA Group in the upcoming flotation on Wall Street. This will open up a new and different phase which I feel should be spearheaded by the CEO of the Group.
"I wish the shareholders, particularly Piero Ferrari who has always been by my side, and everyone in the company the many more years of success that Ferrari deserves."
Di Montezemolo, who took over as chairman in 1991, paid tribute to the Ferrari staff who had worked with and alongside him, adding: "My thanks, first and foremost, to the exceptional Ferrari women and men from the factory, the offices, the race tracks and the markets across the world. They were the real architects of the company's spectacular growth, its many unforgettable victories and its transformation into one of the world's strongest brands.
"My thoughts go also to our fans who have always supported us with great enthusiasm especially through the Scuderia's most difficult moments.
"I devoted all of my enthusiasm and commitment to [Ferrari] over the years. Together with my family, it was, and continues to be, the most important thing in my life."
Speculation about Di Montezemolo's future had intensified at Monza last week, with the team in the midst of a disappointing campaign.
Fernando Alonso has scored the Scuderia's only two podiums this year, but currently sits fifth in the drivers' championship, with just over half the points of Mercedes' Nico Rosberg. Kimi Raikkonen lies ninth.
Ferrari slipped to fourth in the 2014 constructors' standings, behind Williams, following last weekend's Formula 1 Gran Premio d'Italia 2014.