The British contingent received a rousing ovation from the crowd in the cavernous stadium, where a flamboyant spectacle of sound and colour typical of a Brazilian carnival welcomed the 206 guest nations competing in the 31st summer games.
Murray, the defending Olympic champion and two-time Wimbledon winner, held the Union Jack aloft with his left arm - after appearing to struggle with the pole in practice - followed by gleeful Team GB members.
Speaking afterwards, the Scotsman said: “It was amazing to get to carry the flag and but also be around the rest of the British team and chat to the guys. It’s been a really nice atmosphere and I’m obviously really proud to get the opportunity.
“My first thought was ‘don’t drop it’ and I was gripping onto the flag really tight. Then I was just trying to take it all in. The size of the stadium was incredible.”
Wearing red, white and blue, Team GB soaked up the electric atmosphere, with some taking the obligatory selfies while all waved to the crowds.
Chef de Mission Mark England said the occasion was “everything we hoped it would be - vibrant, colourful and energetic” and would give the team a boost ahead of the competition.
Britain may see its first flourish of medals on Saturday, with Chris Froome hoping to add to his third Tour de France victory in July with a gold in the men’s road race, and judoka Ashley McKenzie in the bronze round of the men’s 60kg.
However, the opening extravaganza came as Brazil reels from political crises, economic woes and fears over Zika virus. The country’s acting president, Michel Temer, was booed as he declared the games officially open.
There was similar derision reserved for team Russia, who were jeered as they entered the Maracana - this year’s games coming after the world of athletics was rocked by the scandal of state-sponsored doping of the country’s athletes.
And after a wave of terrorist attacks around the world, a massive security presence is in place in Rio, with a vast deployment of police and military personnel deployed around Olympic sites.
More than 80,000 police and security staff are being used in the city - double the amount used for the London Olympics in 2012.
Even as the opening ceremony got under way bomb disposal teams were deployed to examine two suspicious bags near the beach volleyball arena on the Copacabana.
Explosives robots were brought in and the items were later deemed safe.
The alert came after thousands of anti-government protesters marched along the famous waterfront demonstrating in support of ousted president Dilma Rousseff.
The pre-ceremony protest followed ugly scenes on Thursday that marred the Olympic torch’s arrival in the Brazilian city.
Hundreds of people turned out to challenge the torch’s arrival in Rio out of anger over the cost of hosting the event that began against a backdrop of civil and political unrest in the country.
Mr Temer, a 75-year-old law professor, became acting president after the Senate voted in favour of launching an impeachment trial against Ms Rousseff, suspending her.
The opening ceremony deviated from its carefully-constructed script within five minutes of the lavish event starting when Mr Temer was not announced to the crowd.
It is unclear why Mr Temer was not announced although the protests against the cost of the Olympics that have marred the build-up to Rio’s big moment on Friday would suggest organisers were concerned he would be jeered.
That is a fate that befell athletes from Brazil’s traditional rival Argentina, although those boos were of the pantomime variety and the selfie-snapping Argentinians did not appear to be remotely fazed.
Overall, the atmosphere in the Maracana Stadium was celebratory, as a succession of actors, dancers and musicians raced through routines intended to showcase Brazil’s culture, diversity and history, even finding time for a brief lecture on environmental issues.
Brazilian supermodel Giselle Bundchen’s sashay across the stadium to the sound of The Girl From Ipanema will no doubt feature in newspapers around the globe, as will a clever section that featured a biplane appearing to fly out of the stadium and circle the city’s signature Christ the Redeemer statue.
The ceremony’s creative director Fernando Meirelles had less money to spend than his predecessors, including the mastermind of London 2012’s memorable show Danny Boyle, but he promised “the coolest party” and he certainly gave it a go.
And the roar the crowd gave the likes of Spain’s Rafael Nadal and the US team, led by Michael Phelps, would support the view that has been growing that Rio is ready to forget its concerns about the broken political system, struggling economy and alarming Zika virus to enjoy its moment as the centre of the world’s attention.