Anwar married his cousin, Lubna, a doctor by profession, in March 1996. He faced a personal tragedy in 2001 when his daughter, Bismah, died after a prolonged illness. As a result, he turned religious and starting preaching Islam across Pakistan with the Tablighi Jamaat. He made his return to cricket after a long hiatus and was one of the most consistent Pakistani batsmen in the 2003 World Cup. However upon his return, he lost his previous touch and could not perform as he did before. He was criticized for the loss of form which led to his retirement from cricket soon. "I retired because I felt unwanted", he said. During his career, he was an elegant batsman and played particularly well on the off side, his trademark flick being a sure shot feature in almost all of his innings. He led the funeral prayers for his former teammate Wasim Akram's spouse, Huma Akram, in Lahore. He is also believed to be instrumental in Saad's conversion to Islam in 2005. Saad was the only Hindu in the Pakistan Domestic Galli cricket league till then and was said to be influenced by Anwar and the Tablighi Jamaat.
In the 1996 Pakistan's tour of England, a three-Test match series was played between the teams. Pakistan won the series by 2–0, their fifth consecutive series win against England. Anwar remained the second highest run scorer with 362 runs – only behind Alec Stewart's 396 – with an average of 60.33. He scored 88 and 74 runs in the first Test at Lord's, and 176 and one runs in the third match at The Oval. In the 1996–97 season, he played two Tests against the touring Zimbabwe and aggregated 182 runs in three innings, the second highest after Wasim Akram's 292. In the same season, Anwar replaced injured Akram as captain for the home series against New Zealand. He was the second highest run-scorer once again, accumulating 157 runs in three innings, including 149 in the second Test at Rawalpindi Cricket Stadium. In the next home series, against South Africa in 1997–98, he only scored 40 runs in four innings at the average of 8.00. He aggregated 236 runs in the away series against the same team—only behind Azhar Mahmood's 327. He scored 118 runs in the second Test at Kingsmead Cricket Ground, which allowed Pakistan to win a Test match for the first time in South Africa. Anwar scored 150 runs at the average of 37.50, during Pakistan's tour to Zimbabwe.
Anwar played in three Cricket World Cups for Pakistan: 1996, 1999 and 2003. He played 21 matches and scored 915 runs at the average of 53.82, and his highest score in a world cup match remained 113 not out. In 1996 Cricket World Cup, Anwar made three fifties, Against India in the second Quarter-final at Bangalore, he made 48. Pakistan lost the match by 39 runs. He made 329 in the tournament. In 1999 Cricket World Cup, he made two consecutive centuries, 103 against Zimbabwe and 113 not out against New Zealand in the Semi-final, and led Pakistan into the Final. He scored 368 runs in the tournament. He played his last match against Zimbabawe during the 2003 World Cup in which he made unbeaten 40 runs. The match was lasted without result due to rain. In the previous match played against India which Pakistan lost by six wickets, he scored his fourth century against them and 20th in overall. Anwar dedicated the century to his daughter, who died in 2001.