He was elected to the Norwegian Parliament from the Market towns of Vest-Agder and Rogaland in 1950, but was not re-elected in 1954. Nilsen held various positions in Haugesund city council in 1922–1931, 1937–1940 and 1945–1953, serving as mayor during the term 1945–1947.