He began his military career in the militia in Toronto in 1864. He joined the Regular infantry when it was established in 1883. On May 2, 1885, he led a Canadian force of more than 300 in the Battle at Cut Knife Hill against Poundmaker's Cree Indians. Otter's tactics were ineffective against the defending warriors, forcing him to retreat.
Otter commanded the 2nd Battalion, Royal Canadian Regiment of Infantry in South Africa, where they were considered by many British officers to be the best infantry battalion in the country. He became the first Canadian-born officer to command Canada's military in 1908, and he retired in 1910 as General Sir William Otter KCMG, CVO. During the First World War he came out of retirement to command operations for the internment of enemy nationals resident in Canada.