Afghanistan were in command halfway through a gloomy day in Cardiff after dismissing Sri Lanka for 201.
But faced with a rain-revised target of 187 in 41 overs, their batting crumbled as they were bowled out for 152.
Pradeep took a career-best 4-31, while Malinga (3-39) struck at both ends of the innings, finishing the match with a trademark yorker that bowled Hamid Hassan.
Victory saw Sri Lanka bounce back from a 10-wicket thrashing by New Zealand in their World Cup opener.
But Sri Lanka's batting remains a concern. They were set for a huge total against Afghanistan at 144 for one but lost their last nine wickets for 57 runs, with spinner Mohammad Nabi taking three in five balls.
But Pradeep struck twice, having Naib lbw before bowling Rashid Khan to leave Afghanistan 123-7.
And when Najibullah was run out by Dimuth Karunratne's direct hit, Afghanistan were nine down.
Earlier, Sri Lanka started strongly against the unfancied Afghans, who suffered a seven-wicket loss to Australia in their tournament opener.
But they suffered a spectacular slump, with 35 extras the innings' second-top scorer behind Kusal Perera's 78.
Rashid Khan eventually got in on the act when he had Kusal Perera caught behind.
Rain then stopped play, with Sri Lanka 182-8. The two-hour delay meant the match was reduced to 41 overs per side.
Sri Lanka folded quickly after the resumption, losing Malinga and Pradeep for the addition of just 19 more runs.