After hearing Buddha's teaching from a monk called Assaji, Sariputta sought out Gautama Buddha and then became his disciple. Both Sariputta and Mahamaudgalyayana are often depicted with Buddha. There are also several Suttas in Buddhist texts that describe interaction between Sariputta and Mahamaudgalyayana.
There is one comical scene narrated regarding the two friends. A mischievous Yakkha decided to irritate Sariputta by hitting him on the head. Mahamaudgalyayana could see this incident with his divine eye and tried to warn Sariputta. But his attempt was in vain. Then he applied his spiritual mastery, which helped Sariputta to perceive the severe blow of the Yakkha as the light breeze only. Mahamaudgalyayana then approached Sariputta and expressed his amazement that Sariputta barely noticed the terrible blow.
Sariputta often used to preach with Buddha's approval and was awarded with the title of 'General of the Dharma' or'Dhammasenapati'. He helped in the propagation of the Buddhist religion and was the founder of the Abhidharma tradition. Buddha also lightly called down Sariputta on occasion when he did not fully explained the Dhamma to the prince and also when he allowed a group of novice monks to become too loud. However, Sariputta was among the highly praised disciples of Buddha and on one occasion Buddha declared him to be a true spiritual son and his chief assistant who 'turned the Wheel of Dharma'.
As the Pali canon says Sariputta died sometimes before the death of Buddha and achieved Parinirvana.