The British number one is the first - and so far only - player named by the British Olympic Assocation for the tennis tournament, which will take place at Wimbledon's famous All England Club.
Murray has been confirmed for the men's singles only, although he could yet play in the men's and mixed doubles too.
The world number four will be competing in his second Olympic Games having played singles and doubles in Beijing, suffering two disappointing early exits.
Speaking about his selection, Murray said: "I can't wait for the Olympics to start, it's such an incredible event and for it to be in London is extra special.
"I remember being part of the Olympic (opening) ceremony in Beijing, which was an unbelievable atmosphere and like nothing I'd experienced before.
"Winning a medal this summer for Team GB is one of my major goals."
Team GB chef de nission Andy Hunt added: "I'm very pleased to welcome Andy Murray as the first tennis player selected to Team GB for the London 2012 Olympics.
"Andy has thrilled British tennis fans with his outstanding performances for many years now and I'm sure there will be an electrifying atmosphere supporting him during the Olympic tennis competition at Wimbledon this summer."
No other Briton has qualified directly for the singles draws, although it is expected that at least one British woman will receive a wild card. the International Tennis Federation will confirm the full fields on June 28.
The Olympic tennis tournament takes place from July 28 to August 5.
Tim Henman and Neil Broad were the last Britons to medal at the Olympics, winning doubles silver in Atlanta in 1996.