Media playback is not supported on this device
The four-time Olympic gold medal winner polled the most number of votes among the 542 members of the British team.
The 36-year-old cyclist also carried the Union Flag at the 2008 closing ceremony in Beijing.
"I'm absolutely delighted and honoured to have been voted as the flag bearer for Team GB," said Sir Chris.
"To lead out your team at a home Olympics is truly a once in a lifetime opportunity and one that that I can't wait to experience in just a few days time."
Other Olympians who received support included archer Alison Williamson, who will compete in her sixth Games.
Hoy, who will compete in the team sprint and keirin at London 2012, is the first cyclist to have the honour of carrying the British flag at an opening ceremony.
The Scot will lead out Team GB when they become the last of the 204 competing nations to enter the arena.
Sir Chris Hoy was always one of the outstanding candidates for this role. His election was all but sealed when sailor Ben Ainslie, his main rival, was ruled out. Ainslie begins competing on Sunday, so will not attend the opening ceremony.
Sir Chris already has four Olympic gold medals and hopes to have increased that total to six by the end of the Games.
Hoy told BBC Radio 5 Live: "I'm still in shock, it's all sinking in. I'm just looking forward to Friday.
"To have the athletes vote for you it makes it even more special. This will be my first experience of an opening ceremony so for a number of reasons it will be very special."
It has been a remarkable few days for British cycling following
Brian Cookson, president of British Cycling, told BBC Sport: "Just when you think it can't get any better it does. It is the cherry on the cake for British Cycling after Bradley Wiggins's success on Sunday.
"Sir Chris is a brilliant athlete and a fantastic ambassador for the sport of cycling. Hoy is reaching his potential just at the right time in the sport and deserves this pivotal role at London 2012."
Hoy, who is Scotland's most successful Olympian, was named BBC Sports Personality of the year in 2008.
He won a silver medal at the Sydney Olympics in 2000, a gold at Athens in 2004 and another three golds in Beijing four years ago.
Team GB's Chef de Mission Andy Hunt said: "Team GB could not have placed the flag in better hands.
"It is a great honour for Sir Chris and the team will be proud to march behind him. He is a fantastic ambassador for his sport and his country."
Hoy is not due to compete until the second week of the Games, when he will try to surpass rower Sir Steve Redgrave's British record of five gold medals.
The British Olympic Association asked each sport represented in Team GB to nominate one candidate. The team leaders of each sport then voted on the shortlist.
Sir Chris Hoy has been chosen to carry the flag for Great Britain at the opening ceremony of the London Games on Friday.