Baker replaces Lorraine Candy, who was poached by Hachette Filipacchi's Elle earlier this year.
Baker, who left the industry to work on a novel last September, will take the new role in July and is joining as NatMags attempts to halt the title's circulation decline.
The magazine, which saw its sales slide to 460,655 last year, is looking to reinvent itself for younger consumers. It is working with Rise Communications to develop a marketing strategy. It is in talks with a number of ad agencies but has yet to announce a shortlist.
Jan Adcock, Cosmopolitan's group publishing director, said: "Baker is an exceptional talent. Her experience, drive and passion for journalism make her the perfect choice."
Duncan Edwards, the NatMags managing director, said: "We are delighted to be welcoming Sam back to NatMags. She is one of the most gifted editors of her generation and her appointment to this position heralds a new era for Cosmopolitan."