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.
"These lads have worked their socks off tonight. Simon Church was just what we needed up front, and if everybody does their job and you've got Aaron Ramsey pulling the strings then Wales have something they haven't had before.
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."
- 01 Hennessey Booked
- 02 Taylor Booked
- 05 Gunter
- 06 Collins
- 03 John Booked
- 04 Vaughan
- 07 King
- 10 Ramsey
- 11 Robson-Kanu
- 08 Bellamy
- 09 Church (Easter - 90' )
- 12 Myhill
- 21 fon Williams
- 16 Alfei
- 17 Wilson
- 22 Wiggins
- 13 Isgrove
- 14 Wilson
- 15 Richards
- 18 Tudur-Jones
- 19 Cotterill
- 20 Easter
- 01 Pacovski
- 03 Alioski
- 04 Noveski
- 06 Sikov Booked
- 13 Ristovski
- 08 Demiri (Kostovski - 86' )
- 14 Randjelovic
- 17 Stjepanovic (Tasevski - 75' )
- 10 Pandev
- 19 Ibraimi
- 21 Ivanovski (Trajkovski - 80' )
- 12 Naumovski
- 02 Georgievski
- 05 Grncarov
- 15 Mojsov
- 23 Ivanovski
- 16 Gligorov
- 18 Babunski
- 22 Tasevski
- 07 Blazevski
- 09 Jahovic
- 11 Trajkovski
- 20 Kostovski