Born in Stavanger, Nielsen was a member of Harstad city council from 1919 to 1922, and then served as mayor from 1922 to 1925. He later held various positions in Stavanger city council from 1934 to 1947, except for a period between 1940 and 1945 during the German occupation of Norway.