Aaron Ramsey scored the first goal 42 minutes into the game, in front of a crowd of mostly Turkey supporters in Baku’s Olympic Stadium.
The team's victory was secured in the final moments of stoppage time when Gareth Bale set up Connor Roberts to score from close range.
Wales now has four points after two games.
Both teams were determined to win on Wednesday night in order secure qualification for the last 16.
In their Euro 2020 opener on Saturday, Wales drew 1-1 with Switzerland in Baku, while Turkey was beaten 3-0 by Italy in Rome on Friday.
Ramsey had missed a chance halfway through the first period when Bale found him with a delightful ball.
But he made no mistake when Bale spotted him with another pass and Ramsey tucked the ball past goalkeeper Ugurcan Cakir for his 17th Wales goal.
Ramsey had attempted an earlier goal when he cut inside Caglar Soyuncu and his near-post shot was saved by the outstretched foot of Cakir.
Turkey responded instantly and Burak Yilmaz’s effort was deflected just wide by Chris Mepham.
After the break, Wales were awarded a penalty on the hour when Zeki Celik tripped Bale just inside the area.
Bale stepped up to take the spot-kick himself but sent it way over the crossbar.
Goalkeeper Danny Ward produced a late save to deny Turkey substitute Merih Demiral from close range.
Only a few hundred Wales supporters have made the 3,000-mile trip to watch their national team play, against the advice of the Welsh government.
Meanwhile, thousands of Turkey fans made the relatively short journey to Baku.
The close ties between Turkey and Azerbaijan also means the local population are likely to support the Crescent-Stars.