He was born at Kongsberg in Buskerud, Norway. In 1831 he earned his medical degree from the University of Christiania (now University of Oslo). From 1833 to 1846, he practiced medicine in Kongsberg. Afterwards, he became a lecturer of dermatology and surgery at the University of Christiania and later attained a full professorship (1851-1869). He was also physician at Rikshospitalet (1850-1875). .
Boeck specialized in research and treatment of syphilis. He is remembered for his experiments with "syphilization", which was a form of vaccination against the disease. The practice consisted of repeated inoculations of secretion from "soft chancre", until inoculation caused no further reaction. Boeck wasn't the first physician to use syphilization, as it was earlier attempted by Joseph Alexandre Auzias-Turenne (1813–1870), who experimented with syphilization on laboratory animals.
In the 1840s, with dermatologist Daniel Cornelius Danielssen (1815–1894), Boeck conducted research of leprosy. From their studies, the two physicians collaborated on an important treatise on leprosy called Om Spedalskhed. At the time, Boeck and Danielssen believed leprosy to be an hereditary disease. Later in his career, he visited the United States in order to research leprosy among Norwegian-American immigrants.