Marthinsen enlisted in the Norwegian Army toward the end of World War I and finished his training as a non-commissioned officer in 1918 and was promoted to sergeant in 1919. After his military service, he most likely served as a sailor until 1928, when he re-enlisted in the army. He was assigned to duties in the border regions between Norway and the Soviet Union and was an intelligence officer in Finnmark during the Winter War, monitoring suspected Communist sympathizers.
Marthinsen joined Nasjonal Samling as one of its first members, in 1933. After Nazi Germany had invaded and occupied Norway in April, 1940, Police minister under the puppet Quisling regime, Jonas Lie appointed Marthinsen to command the newly formed Utrykningspolitiet, which was later renamed Sikkerhetspolitiet. He was made police general and became a key liaison between Norwegian police forces, the Quisling cabinet, and German Gestapo. He also became leader of the nationwide, paramilitary Hird organization.
Marthinsen quickly earned notoriety as the leader of the all-Norwegian police force. He played an instrumental role in implementing the Holocaust in Norway, resulting in the murder of more than 700 Jews and the brutal mistreatment of many more; he was also known to take a relaxed view of legal process, and tolerated if not encouraged torture among his forces.
Marthinsen was assassinated by the Norwegian resistance group Milorg as part of Operation Buzzard, acting on orders from the government in exile. A team of trained gunmen waited for his car behind a woodpile near his home in Blindernveien 74 in Oslo. The car had just started to move when they opened fire with automatic weapons, instantly killing Marthinsen in the passenger seat and lightly injuring his driver. Documents disclosed after the war indicate that the political leadership ordered the assassination to prevent Marthinsen from carrying through his plans to enlist Norwegian paramilitary forces to violently subvert the expected capitulation of Nazi Germany in Norway.
Reichskommissar in Norway Josef Terboven convened the same day a meeting with both the Norwegian and German administration in occupied Norway, including SS commander Wilhelm Rediess, head of Sicherheitspolizei, Heinrich Fehlis, Vidkun Quisling, police minister Jonas Lie and minister of justice Sverre Riisnæs. Terboven argued that the assassination threatened the credibility of the Nazi regime and requested that 75 Norwegians be executed in retaliation. The Norwegian leaders objected but were overruled, but in subsequent discussions in the following day, the number was reduced to 34. A list of Norwegians was submitted, and those on the list were condemned.
Norwegian officers were coerced into carrying through the executions. Some accounts place Riisnæs at the executions visibly intoxicated, using his service pistol to participate in the execution. A press release announced that 34 were killed by firing squad, but it turned out that five individuals were kept in prison and discovered after the war.
The extent and severity of the reprisals shocked the Norwegian population and government-in-exile, resulting in a general moratorium against targeted killings of high-ranking Nazi officials.