Sanakoyev was born in Tskhinvali, in what was then the South Ossetian Autonomous Oblast of the Georgian SSR. He graduated from the South Ossetian Pedagogical State Institute in 1993, and served as a Soviet army officer in Lithuania from 1987 to 1989. In the 1991-1992 war between Georgian forces and secessionist militias he fought on the Ossetian side. In 1993-1996 worked in the South Ossetian de facto defence ministry. In 1996 he was appointed defence minister and in 1998 vice prime minister. In July 2001 he became prime minister of South Ossetia, serving until December 2001, when Eduard Kokoity replaced Lyudvig Chibirov as South Ossetia’s leader.