Abbas has taken 91 Championship wickets at 16.83 for Hampshire since joining in 2021. He was part of a potent seam-bowling trio, alongside Kyle Abbott and Keith Barker, last summer as Hampshire pushed for their first title since 1973 - eventually finishing third in Division One, behind Surrey and Lancashire.
"Mo has been a big influence on the team," Giles White, Hampshire's director of cricket, said. "Since his arrival he has been both an incredible performer and a fantastic role model. To have him around for the next two years is a major boost to the squad."
Abbas, 32, last played Test cricket for Pakistan in August 2021 and is likely to be available for Hampshire throughout the next two summers.
Abbas said: "I'm very pleased to have signed a new contract and to be staying with Hampshire for two more years. I've loved my time at the Ageas Bowl and am looking forward to helping the team push for silverware in the LV= Insurance County Championship."