"As in all parliamentary monarchies," Defense Minister Margarita Robles said after a cabinet meeting that Leonor "has to have a military background and a military career."
Spain's government tweeted news of the announcement with an accompanying explanation from Robles.
Training set for September
The oldest daughter of King Felipe VI turns 18 in October and will report for duty at the Spanish army's General Military Academy in Zaragoza during the 2023-24 intake, Robles said.
"In due course, the commander-in-chief of the armed forces will be a woman, and in recent years we have been making a very important effort to incorporate women into the armed forces," Robles said.
Princess Leonor is then expected to attend university in Spain once she finishes her military training and complete a master's abroad.
King Felipe also underwent intensive military training before studying law in Madrid and then going on to obtain a master's in international relations at Georgetown University in Washington.
Other notable royals who have spent time in the armed forces include British Princes William and Harry, with the latter royal performing two tours of duty in Afghanistan, and rising to the rank of captain.