The baton will travel across Wales over four days in September ahead of the Gold Coast games in April 2018.
Chris Jenkins, Commonwealth Games Wales chief executive, said the route would "give everyone that can't make it to the Gold Coast a chance to be involved in an unforgettable experience".
In total, it will travel 142,915 miles (230,000 km) in its 388-day journey.
The baton will be passed between people as it makes its way from south to north Wales from 5 to 8 September.
Athletes, celebrities and people who represent their communities are among those who will take part.
Ahead of the 2014 games in Glasgow, Paralympic champion Aled Sion Davies, One Show presenter Alex Jones and Joseph Price - the last surviving deputy from the Six Bells colliery disaster which killed 45 men - all carried the baton.
Prof Nicola Phillips, Team Wales chef de mission for Gold Coast 2018, said: "Not everyone can make it to the Gold Coast, so by bringing the Queen's Baton to Welsh communities we hope to inspire and ignite Welsh pride in our athletes."
The Welsh route of the Queen's Baton Relay ahead of the 2018 Commonwealth Games has been revealed.