Simon Church's second-half goal moved Wales above opponents Macedonia and Scotland in their World Cup qualifying group.
Church fired high into the net from eight yards after Aaron Ramsey and Craig Bellamy - playing his last home game for Wales - had combined well.
Captain Ramsey had a late penalty saved by Tome Pacovski and Goran Pandev went close for the visitors.
But Wales held on to earn a much-needed victory for manager Chris Coleman.
Coleman is still waiting to hear if he will be given a new contract at the end of this qualifying campaign - and he made seven changes to the side that lost 3-0 to Serbia in September.
Injuries had deprived Wales of the world's most expensive player - Real Madrid's Gareth Bale - usual skipper Ashley Williams and eight others.
It meant a first cap for Cardiff City's 18-year-old full-back Declan John, with Swansea left-back Neil Taylor switching to the right and Chris Gunter moving into the centre of defence alongside the recalled James Collins.
The West Ham defender was back in the side after settling his differences with Coleman, who had accused him of rejecting the chance to join the squad before the Serbia match - a claim denied by Collins.
After a cagey start, the first half opened up with the impressive John making inroads down the left and Hal Robson-Kanu causing problems on the right.
The big Reading forward had two penalty shouts turned down, though replays suggested he had a good case against Stefan Ristovski.
Church tested Pacovski with a powerful header, and then saw a left-footed shot deflected over the bar by Vance Sikov with the goalkeeper beaten.
However, Wales were lucky to reach half-time level after the home defence was caught out at a corner, allowing Nikolce Noveski to round Wayne Hennessy - but he blasted over.
The hosts went close early in the second half when David Vaughan's cross struck the underside of the bar - and John also hit the frame of the goal with a chip that confused Pacovski.
Wales took the lead in the 67th minute when Ramsey unpicked the defence with a superb ball for Bellamy, who squared the ball to Church to convert.
Ramsey continued to trouble the Macedonian defence and won a penalty when he was brought down by Nikolce Noveski, but the Arsenal midfielder's spot-kick was comfortably saved by Pacovski.
There were a few panics in the Welsh defence late on, with Hennessy saving well from the threatening Pandev.
Wales's last game is against group winners Belgium in Brussels on Tuesday.
Wales manager Chris Coleman told BBC Radio Wales: "It is one of my happier nights. When you get a lot of young players in the squad and then we get a result like that for us it was a show of intent.
"We wanted to show people that we have got a little bit of depth in the squad - more than what we thought by the looks of it - because I thought our lads were absolutely brilliant.
"We played some great football at times, made chances. We rode our luck a bit, they had a few chances but overall I thought we deserved to win it."