You may be thinking of Peter Collins, who handed his Ferrari over to Fangio in '56 so that Fangio could race on after his own car broke down and take the title. Collins reasoned that he'd get another chance. Sadly, he died part-way through the 1958 season.
He finished second in the drivers championship from 1955-1958, lost by a point in 1958 to Mike Hawthorne. Hawthorne was disqualified in one race apparently unfairly. Moss even though battling him for the title spoke up and helped him get the result re-instated.
I think I've managed to confuse these 2 things together. He didn't give up his car, but he did help get a rival reinstated.
Thanks.