Liivamagi was born in Tallinn, Estonia, the son of Kalle and Tiina Liivamägi. He attended Tallinna Saksa Gümnaasium, and also, swam for the Kalevi Ujumiskool for four years, until he graduated from high school in 2007. One year before, Liivamagi rose to international fame at the 2006 European Junior Swimming Championships in Palma de Mallorca, Spain, where he earned a silver medal in the 200 m individual medley.
At the 2007 FINA World Championships in Melbourne, Australia, Liivamagi placed fourteenth in the 200 m individual medley. He broke a 2:02 barrier and posted an Estonian record of 2:01.37 in the preliminary heats to secure his place for the semifinals. Liivamagi's record time also cleared a FINA A-cut, and earned a spot on the Estonian Olympic team.
Liivamagi qualified only for the men's 200 m individual medley at the 2008 Summer Olympics in Beijing. He challenged seven other swimmers on the fourth heat, including defending European champion László Cseh of Hungary. Liivamagi rounded out the field to last place by 0.48 of a second behind Spain's Brenton Cabello in 2:03.56. Liivamagi failed to advance into the semifinals, as he placed thirty-fourth overall in the preliminary heats. Shortly after his first Olympics, Liivamagi matriculated at the University of California, Berkeley in fall 2008, where he majored in political economy with a focus on industrial societies and globalization. He also played for the California Bears swimming and diving team, under head coaches David Durden and Greg Meehan.
In 2010, Liivamagi won his first ever individual title at the Pac-10 Championships in Long Beach, California, posting a time of 1:43.73 in the 200 m individual medley to clear an NCAA A-cut. On the same year, he wounded up a third-place finish at the NCAA Division I Championships in Columbus, Ohio with his collegiate best of 1:43.05. For the 2011–2012 season, Liivamagi helped his college team by rebounding two back-to-back swimming titles at the NCAA Championships in Federal Way, Washington. At the 2011 FINA World Championships in Shanghai, China, Liivamagi failed to advance into the semifinals of the 200 m individual medley, as he finished his preliminary run in twenty-sixth place, outside his record time of 2:01.88.
At the 2012 Summer Olympics in London, Liivamagi extended his program, swimming in two individual events. He cleared FINA B-standard entry times of 1:01.45 and 2:01.50 from the USA Swimming Grand Prix in Indianapolis, Indiana. During his Olympic run, Liivamagi was fully trained by California Golden Bears coach Greg Meehan, who served as an assistant for the Estonian team. On the first day of preliminaries, Liivamagi placed twenty-ninth in the 100 m breaststroke. Swimming in heat three, he posted a time of 1:01.57 to earn a fifth spot over Poland's Dawid Szulich and Israel's Imri Ganiel by one tenth of a second. In the 200 m individual medley, Liivamagi challenged seven other swimmers on the second heat, including fellow Olympic veterans Bradley Ally of Barbados and Raphaël Stacchiotti of Luxembourg. He picked up another fifth spot by 0.09 of a second behind Russia's Alexander Tikhonov in 2:01.09. Liivamagi failed to advance into the semifinals, as he placed twenty-fifth overall in the preliminaries.