The pair batted throughout the final day without being parted as Nottinghamshire, who followed on 160 runs behind, closed on 236-0.
Vice-Captain Hameed completed two hundreds in a first class match for the second time in his career – the previous time was with Lancashire in the 2016 Roses match at Old Trafford - after his 111 in the first innings.
He set a new record for the most balls faced in a County Championship match – 635 - beating the 625 by Jamie Cox for Somerset versus Hampshire at Southampton in 1999 and also batted for 821 minutes.
Hameed said: “I think I just had the focus on knowing what the team wanted me to do and trying my best to make sure I went out there and did my job as best as I could.
“Having ‘Slats’ (Ben Slater) at the other end who has a calm demeanour about him helped as well and thankfully we were able to go on and do a job for the team.
“When we were asked to follow on, Ben (Duckett) said this was an opportunity for me to go out there and do it again (score another hundred) and then Peter (Moores) said the same.
“After you’ve scored a hundred and then you go out there again 20 minutes later to bat again and the scoreboard says zero it is a great leveller in itself.
“Thankfully I was able to start again and go through my processes again and get there.”
Slater certainly enjoys batting at New Road and last summer, when on loan to Leicestershire, scored 172 against Lancashire in a match switched to a neutral venue because of the impact of COVID-19.
Their partnership broke a 97 year old record for the highest first wicket partnership in matches between the two counties, surpassing the 220 by George Gunn and William ‘Dodger’ Whysall for Nottinghamshire at Trent Bridge in 1924.
Nottinghamshire resumed on 87-0 following a first innings collapse in which they were lost 10 wickets inside two sessions on the third day.
Slater and Hameed had provided a solid base during an opening partnership of 115 in Nottinghamshire’s first innings and again kept the home attack at bay.
Slater cut Charlie Morris for his eighth four to reach a 109-ball fifty in the second over of the day and Hameed leg glanced Joseph to the boundary to complete a century partnership in the 40th over.
There was a rare moral victory for the bowler when Slater edged a delivery from Worcestershire Club Captain Joe Leach onto the boot of keeper Ben Cox.
It was a rare moment of concern for either batsman and Haseeb turned Brett D’Oliveira on the legside for a single to reach his half century from 153 balls with eight fours.
Joseph also beat the forward lunge of Slater on 75 and one run later the same player survived a confident caught behind appeal off the same bowler.
The morning session yielded 57 runs from 30 overs but from Nottinghamshire’s perspective had blunted any realistic hopes Worcestershire harboured of victory.
The pair continued in the same untroubled manner on the resumption and the deficit of 160 was cleared in the 72nd over.
Slater was first to three figures with a thickish edge to backward point off D’Oliveira for a single from the 268th ball he faced and it contained 11 fours.
But Hameed followed shortly after tea when he swept D’Oliveira fine for his 13th four from his 288th delivery.