Andersson grew up in Stockholm.[3] After completing his undergraduate degree, he worked at the Swedish University of Agricultural Sciences. He completed his Ph.D. at Uppsala University.[3] In 2012, Andersson and a team of researchers mapped the pig genome.[5] Andersson has also researched animal domestication, the domestic chicken genome,[6] and the genetics of the white horse.[7]