Losing out to the Championship leader in Race 1 when Rea pulled off a late overtake, Davies was determined to hold on come Race 2.
Leading almost from the lights, he built up an advantage of three seconds over the chasing Kawasaki rider only to watch it slashed to nothing in the final two laps.
As with Race 1, Rea made a late pass to take the lead, however, this time Davies wasn't letting it go.
The Welshman fought back to win the race by a tenth of a second.
"Race 1 went really well, especially considering where we were yesterday, when I was thinking we'd do well to finish top six," he said of his Sunday in Malaysia.
"Anyway, we made some changes overnight that put us in a position to fight for the win, though we were still missing something in the last laps in terms of the grip and electronics working together.
"Then in Race 2 I saw that Johnny was closing in but over the last two laps my tyre really dropped off and it took everything I had to hold him off.
"It was a battle to the line again, and through the last corner when we made contact I thought it was all over, but fortunately we both stayed upright and I was able to cross the line in front!"
It was a good outing for Davies and Aruba.it Racing as he claimed a double podium and moved up to second in the riders' standings. He trails Rea by 144 points.
"I'm so pleased about today's results, obtained at one of the most difficult tracks for us," he added. "This shows how much progress we've made up until now.
"I'm also pleased to have moved into second place in the standings, having made up a lot of points over Tom this weekend.
"Thanks go to my whole team, the guys have done a fantastic job here! Now it's time to relax, and after a good holiday we'll get back to work."