Prince Harry is to begin a four-week placement with the Australian Defence Force on Monday, Kensington Palace has confirmed.
The attachment will see him go on patrol with Aboriginal soldiers and train with the country's special forces.
A palace spokesman said the prince was "tremendously looking forward" to the experience.
Prince Harry will leave the British Army in June, after 10 years' service.
The ADF said they want to provide Harry, who is known as Captain Wales in the Army, with an "authentic military experience".
On Monday he will lay a wreath at the country's Tomb Of The Unknown Soldier in Canberra, during his only scheduled public appearance in Australia, before reporting for duty.
The prince will spend time at army barracks in Sydney, training on helicopter simulators before heading to Perth, where he will train with the Special Air Service.
He will also spend time in Darwin where he will work with members of Norforce, the mostly indigenous unit that patrols northern Australia.
His spokesman said: "Prince Harry has trained and served alongside Australian armed forces on operational tours to Afghanistan; he has met them during the Invictus Games; and even trekked to the South Pole with a couple of Australian soldiers.
"Those experiences reinforced the huge admiration and respect he already had for Australian servicemen and women and has stoked his enthusiasm even more to build on those relationships in the next four weeks."
On announcing his departure from the British Army earlier this month, Prince Harry said it had been a "tough decision" and that he was considering his future career options.