Prince William is to follow his brother into the Household Cavalry's Blues and Royals, Clarence House has said.
The Prince will pass out from Sandhurst in December
The prince, an officer cadet, will aim to become troop leader in an armoured reconnaissance unit, just like Harry.
William, 24, will start a six-month course at Bovington Camp in Dorset upon passing out at Sandhurst in December.
The Ministry of Defence said there may be situations or areas where it was too dangerous for William - who is second in line to the throne - to serve.
"There may be some circumstances where his overt presence might attract additional attention that could lead to a rise in the risk to those he commands or himself," said a spokesman.
"In those instances a judgment would have to be made about his deployment or continuing presence."
Meanwhile, a Clarence House spokesman said William, who will one day be head of the military, will also start "preparing" himself for a royal role.
"The prince will also aim to address the wider issues of preparing himself for his future roles - learning more about constitutional matters, charitable work and the organisation and estate management," he said.
"Finally, Prince William will be further developing his ideas for his medium-term role following Army service, both in supporting the Queen and the Prince of Wales and in furthering his own charitable interests."
Clarence House said the prince, who is second in line to the throne, will undertake "familiarisation attachments" with both the RAF and Royal Navy about a year into his Army career.
He will also be carrying out public engagements in parallel to his military career and these will increase in frequency as he approaches the end of his service.
The Blues and Royals is one of the two regiments that form The Household Cavalry.
The Ministry of Defence said Prince William considered a number of regiments before applying to join.
"He based his decision on the variety of roles which the regiment undertakes, from reconnaissance support to airborne forces, right through to ceremonial duties," it added.
"The Prince was also attracted by the regiment's outstanding record in recent decades, most notably during the Falklands Conflict, the 1991 Gulf War, Bosnia and Kosovo, in Iraq and in Northern Ireland."