Born in Reykjavík on 15 February 1960, Margeir earned his international master title in 1978 and grandmaster title in 1986. He won the Hastings Premier in January 1986 with a score of 9½/13. He won the Icelandic Chess Championship in 1986 and 1987, and won the Nordic Chess Championship in 1987. He competed in the July 1985 Interzonal, scoring 7/17; the 1990 Interzonal, scoring 6/13; and participated in the FIDE World Chess Championship 1998, where he was eliminated in the first round by Lembit Oll.