Striker Tien Linh, who scored a goal in Vietnam’s June 7 clash against Indonesia, opened the scoring by his header on 27 minutes into the game.
Malaysia’s Syafiq Ahmed had a chance to level the scoring when he headed a cross straight at goal, but Bui Tan Truong produced a stunning save to tip it away.
Malaysia were awarded a penalty kick after Rasid was fouled by Doan Van Hau on 72 minutes, and Lucrecio stepped up and equalized the scoring.
Nine minutes left on the clock, Van Toan was fouled in the penalty box and captain Que Ngoc Hai hammered it into the back of the net, putting Vietnam ahead.
Vietnam now stay atop Group G and are due to take on host UAE that stunned Indonesia 5-0 in another game on the same day.
Experts say Vietnam need at least one point in their clash against the UAE to secure a ticket to the next World Cup qualifying round.
Following the dramatic win over Malaysia, State President Nguyen Xuan Phuc, National Assembly Chairman Vuong Dinh Hue and other Vietnamese officials sent letters of congratulation to coach Park Hang-seo and his players.