William has spent more than seven years in the military, first in the army and then as a Royal Air Force pilot, stationed on the quiet island of Anglesey in north Wales.
He was able to blend in with residents and fellow military personnel, enjoying a degree of privacy despite his royal status.
In July his wife Kate gave birth to the couple's first child, Prince George. Now that William's active military career is finished, the family will move into refurbished quarters at Kensington Palace in London. They had been living in a rented home in Anglesey.
William started as an officer cadet at Sandhurst military academy in 2006. He started search and rescue helicopter training three years later.
The palace said he had participated in 156 search and rescue operations, helping to rescue 149 people. He has completed more than 1,300 flying hours.
William's younger brother, Prince Harry, remains active in the military, and has served in Afghanistan as an Apache helicopter pilot.