Norway was ceded to Sweden by King Frederik VI of Denmark.

At the time, Norway was under the control of the Danish crown, and the pair were allied with France in the Napoleonic Wars. When King Frederik VI swapped sides to join Britain and Sweden against France, the Treaty of Kiel was signed to transfer Norway to Sweden.

Source