Prince Charles and his wife Camilla entered the arena at the same time as 72 other red, white or blue cars with links to the Birmingham car industry, which formed a Union flag in the centre of Alexander Stadium.
The couple then took their seats to watch the Red Arrows air display team fly over the arena leaving a red, white and blue trail.
Declaring the 2022 Commonwealth Games officially open on behalf of Queen Elizabeth II, Prince Charles said: “On October 7 last year, this specially created baton left Buckingham Palace to travel across the Commonwealth.
“Over the past 294 days, it has carried not only my message to you, but also the shared hopes and dreams of each nation and territory through which it has passed, as it made its way to Birmingham.
“Over the years, the coming together of so many for the ‘Friendly Games’ has created memorable shared experiences, established long-standing relationships, and even created some friendly rivalries.
“But above all they remind us of our connection with one another, wherever we may be in the world, as part of the Commonwealth family of nations.”
“Tonight, in the words of the founder of the Games, we embark once again on a novel adventure here in Birmingham, a pioneering city that has drawn in and embraced so many throughout its history.
“It is a city symbolic of the rich diversity and unity of the Commonwealth, and one which now welcomes you all in friendship.
“I wish each athlete and team every success. Your hard work and dedication, particularly in recent times, have been an inspiration to all of us.
“It now gives me the greatest pleasure to declare the 22nd Commonwealth Games open.”
Malala Yousafzai, the girls' education activist and Nobel Peace Prize winner, also spoke at the ceremony.
Ms Yousafzai said that the young athletes competing at the Games were a reminder that “every child deserves the chance to reach her full potential and pursue her wildest dreams”.
In a short but powerful message, the activist and author said competitors represented millions of children and “our shared hope for the future”.
“Tonight, teams from 72 countries and territories join the people of Birmingham to celebrate friendship across borders,” Ms Yousafzai said.
“The young athletes who will compete over the next few weeks represent millions of girls and boys across the Commonwealth – our shared hope for the future — a future where every child can go to school, where women are free to participate in society, where families can live in peace and in dignity.
“Over the next two weeks when we watch the incredible athletes of the Commonwealth Games, remember that every child deserves the chance to reach her full potential and pursue her wildest dreams.”
Earlier in the day, Prince Charles posed for photos with hundreds of athletes before the opening ceremony.
The Games at the Alexander Stadium promise to be the biggest sporting festival in the UK since the London Olympics a decade ago.
The Prince of Wales toured the Athletes' Village, meeting sportsmen and sportswomen from dozens of nations, and posing for photographs with teams including Scotland, Rwanda, Sierra Leone and — naturally — Wales.
He spent half an hour chatting with competitors, joking with members of the Australian team that “all the rest are terrified of the Aussies”.
Prince Charles also raised smiles from the Rwandan squad, asking about the accommodation and the food.
“Do they listen to everything you say to them? I bet they don't go to bed on time,” he quipped to a coach from Team Wales.
He was mobbed by athletes within the village who had waited 30 minutes for his arrival, all keen to take a selfie or live-stream to family members back home.
Many of the countries pressed their team pin badges into the prince's hand, including Pakistan, the Cayman Islands and the Isle of Man squads.
Prince Charles also provided some comic relief to the site's security team when he chose to step through the metal detector archway — setting it off, before smiling and raising both hands apologetically.
Earlier, Prime Minister Boris Johnson said he was “supremely confident” there would be a legacy from the £778 million ($944m) of taxpayer money that has gone into the Games, which are being held as the country faces a crisis in the cost of living.
“You can feel the excitement here in this mighty city of Birmingham because the athletes are already here in their thousands, from 56 countries, 72 nations and territories around the world,” the departing prime minister told the Commonwealth Business Forum in the West Midlands city.
“Already you can hear the voices in some parts of the media of those who doubt that the whole thing will be worth it.
“And people say, 'Can we afford it? Should we have done it with the pressure on the cost of living?'
“And so right now, I want you to know I am here to tell you that I am supremely confident that the answer to that question is yes. A thousand times, yes.
"I say so because I remember, almost exactly 10 years ago, an identical moment of nerves just before the beginning of the London 2012 Games.”
Mr Johnson, who was London mayor at the time of the 2012 Summer Olympics, insisted they “continue even to this day to deliver thousands of jobs, growth, regeneration” in the capital.
Culture Secretary Nadine Dorries also defended the expense of hosting the event, the multimillion-pound budget of which was funded by the government and Birmingham City Council.
Ms Dorries stressed the importance of the Commonwealth as a trading and geopolitical bloc.
Birmingham was awarded the Games after scheduled host Durban in South Africa pulled out over financial problems.
“It's not a vanity project … this is hugely important,” Ms Dorries told Sky News.
“Are you saying we shouldn't have the Commonwealth Games?
"I think we are proud and honoured to have picked up the baton when it was dropped elsewhere in the world and to continue to run these Commonwealth Games in the amazing way that we have done.
“Everybody here — thousands of people — are extremely proud, including the volunteers behind me right now, extremely proud of what we're doing.”
Over the next 11 days, more than 5,000 athletes from 72 nations will compete in 280 events across 19 sports.
In his speech, Mr Johnson joked that the “whole EU” should become a Commonwealth member.
“I think we have consistently beaten France," he said. "Every time we have consistently beaten Germany and more importantly still, we have beaten Australia.
“And though France and Germany are not members of the Commonwealth, or not yet. Why not? Get them in. Get the whole EU in. A logical solution.”
Ms Dorries said that “the city is buzzing, it's alive”
“It reminds me of the 2012 Olympics. The feeling in Birmingham and the West Midlands is incredibly upbeat and positive,” she said.
“I think the Commonwealth today is more important than ever, particularly given what's happening in Ukraine and with Russia.”
Later, Prince Charles toured a launch party for the Games in Victoria Square, one of a number of sites hosting the Birmingham Festival — a six-month arts, food and culture event for the 2.5 million people in the region.
The heir to the British throne stopped at a pop-up stall run by Asha's, an award-winning restaurant in the city which has prepared dishes for Hollywood star Tom Cruise.
He also stopped to chat with Keisha Howe of Ace Dance and Music, who was dressed in an elaborate carnival costume, and she cheekily asked the future king: “Do you want to wear this one day?”
He replied with a smile “I don't think I qualify to wear that.”
Prince Charles went on an extensive walkabout, shaking hands and chatting to the crowds that featured people from around the world who had travelled to the West Midlands for the Games.
At a nearby hotel, the prince joined a reception attended by the culture secretary and high commissioners from across the Commonwealth.