Jayasuriya smashed 73 off 74 balls and Jayawardene was unbeaten on 77 as Sri Lanka, set a target of 352 runs, ended a tense fourth day's play at the Sara Oval on 262-5.
Sri Lanka need 90 more runs with five wickets in hand to sweep the series 2-0 after thrashing South Africa by an innings and 153 runs in the first Test at the Sinhalese sport club (SSC).
Wicket-keeper Prasanna Jayawardene kept his captain company at stumps on 27, the pair having put on 61 for the unbroken sixth wicket here on Monday.
Earlier, Muttiah Muralitharan equalled his own world record of four consecutive 10-wicket hauls as South Africa were bowled out for 311 in their second innings within the first hour.
Captain Jayawardene, dropped by Herschelle Gibbs at gully off Andrew Hall when he was on two, showed the touch that brought him the fourth highest Test score of 374 in the first Test.
He has so far hit seven fours and two sixes, defying South Africa's bowlers at a time when they appeared to have the upper hand.
Left-handed Jayasuriya hit nine boundaries and three sixes as Sri Lanka attempt to surpass their most successful chase of 326-5 against Zimbabwe at the SSC during the 1997-1998 season.
Left-arm spinner Nicky Boje was South Africa's chief wicket-taker, removing Jayasuriya before tea and Tillekeratne Dilshan and Chamara Kapugedera on resumption to make it 201-5.
The tourists were handicapped by a hamstring injury to Makhaya Ntini, which forced the pace spearhead to bowl just 44 deliveries at half speed.
Sri Lanka lost opener Upul Tharanga in Ntini's second over, edging a rising ball to Gibbs in the slips.
Jayasuriya and Kumar Sangakkara added a quickfire 82 for the second wicket with a flurry of strokeplay, especially against veteran seamer Shaun Pollock.
Jayasuriya smashed 15 runs in one Pollock over, including a six over the straight boundary. Two overs later the batsman repeated the stroke and this time the ball sailed out of the ground.
Pollock, who began the Test on 394 wickets, finally tasted success for the first time in the match after 21 unsuccessful overs when Sangakkara drove a short ball to Hashim Amla at point.
Left-handed Sangakkara made 39 that included four boundaries in one over from Dale Steyn.
Muralitharan, who claimed five wickets in the first innings, finished with 7-97 in the second by taking all the three remaining wickets when the tourists resumed on 257-7.
Mark Boucher made 65, adding 29 valuable runs for the last wicket with Ntini who remained unbeaten on five.
Muralitharan's 12-225 here follows his match haul of 10-172 in the previous Test and 11-132 and 10-115 against England in Nottingham and Birmingham earlier in the year.
The 34-year-old's earlier feat of four successive 10-wicket hauls came at home during the 2001-2002 season when he took 11-196 against India, 10-111 against Bangladesh and 11-170 and 10-135 against the West Indies.
Muralitharan now has 657 wickets, second behind Australian record-holder Shane Warne's tally of 685. He ended the short two-match series with 22 wickets.