Bangladesh were struggling at 84-4 following fast bowler Nel's early triple-strike before middle-order batsmen Ashraful (87) and Aftab Ahmed (35) steadied the innings with a 76-run stand for the fifth wicket.
It was Bangladesh's best batting performance since successfully chasing a 192-run target against former champions India in their opening group match in Trinidad last month.
Aftab was the first to go for big shots, smashing two sixes in an over from Justin Kemp. This was the beginning of the onslaught as Ashraful then improvised brilliantly to help his team post a respectable total.
Ashraful completed his 11th half-century with an attacking shot, lofting fast bowler Makhaya Ntini for a straight four and then hitting two more boundaries in the same over.
Ashraful struck 12 four in his 83-ball knock, his best since scoring 94 against England at Trent Bridge in 2005.
Nel had ended Bangladesh's early flourish with three quick wickets before Ashraful propped up the innings with a sensible knock.
The fast bowler, dropped after going wicketless in his team's opening game against the Netherlands, looked in fine nick as he dismissed openers Javed Omar and Tamim Iqbal, and skipper Habibul Bashar in his disciplined opening spell.
Bangladesh were off to a solid start after being put in to bat, but Nel restored the balance with three wickets in four overs to eventually finish with 5-45.
Nel broke a 42-run stand for the opening wicket when he removed Omar, who cut straight into the safe hands of skipper Graeme Smith at point after contributing 17.
The South African fast bowler reduced Bangladesh to 69-3 when he dismissed Bashar and left-handed opener Iqbal in the space of 10 runs.
Bashar offered a return catch after making five, while left-handed opener Iqbal's attractive cameo ended when he was caught behind while attempting to pull.
Teenager Iqbal often stepped into the realm of adventure, hitting Ntini for a couple of boundaries early in his innings before falling playing one shot too many. He struck six fours in his 59-ball 38.
Saqibul Hasan (nine) also fell playing strokes, caught at point by Smith off Jacques Kallis to leave his team struggling at 84-4 in the 24th over.
Bangladesh 251 for 8 in 50 overs (Mohd Ashraful 87, Tamim Iqbal 38, Aftab Ahmed 35, Mortaza 25; Nel 5 for 45, Kallis 1 for 27) Vs South Africa (yet to bat).