Marquez, last year's runner-up in Moto2 and the current leader of the championship, will join Dani Pedrosa in an all-Spanish line-up at Honda.
Marquez, who won the 125cc title in 2010, replaces Casey Stoner at the team, the Australian set to retire at the end of the year.
"To reach MotoGP next season with Repsol Honda is a dream come true and I want to thank HRC for their confidence in me," said Marquez.
"I am very proud to be a part of the big Honda family for the future and I don't want to forget all the people have helped me since I began to ride motorbikes.
"Now my focus is on Moto2 where my team and I are working very hard and we are excited to achieve our goal, which is to win the World Championship in 2012."
Pedrosa, meanwhile, has extended his contract with the team for another two years.
"It's been a very long relationship with Honda and I had a strong desire to stay here," said Pedrosa. "The fight for the Championship this year is still open and the next two seasons will be very interesting for me.
"My whole career has been linked to Honda, since I entered into the World Championship in 125cc, then in 250cc and since 2006 in MotoGP.
"I'm perhaps one of the riders with the longest history with Honda, which makes me feel very proud. I want to thank HRC once again for their support; I'm sure that we have great things to do together."