Fleming, playing a record 87th Test for his country, struck 137 not out in New Zealand's 338 for three at the close.
Richard Hadlee, the first man to take 400 test wickets, played 86 Tests.
On the way to his eighth Test hundred, Fleming also overtook the previous highest New Zealand test runs aggregate of 5,444 set by Martin Crowe.
He added 204 for the third wicket with Scott Styris, who was caught and bowled by left-arm spinner Mohammad Rafique for 89.
Rafique, who also dismissed opener Mathew Sinclair for 23, was the most successful of the bowlers with two for 85 from 34 overs.
Fleming has faced 215 balls in a chanceless innings, including 15 fours. New Zealand won the first match in the two-Test series by an innings and 99 runs.
New Zealand first innings
M.Richardson c Mushfiqur Rahman b Enamul Haque Jr 28
M.Sinclair b Mohammad Rafique 23
S.Fleming not out 137
S.Styris c and b Mohammad Rafique 89
N.Astle not out 34
Extras (lb-9 b-4 nb-13 w-1) 27
Total (for three wickets, 92 overs) 338
Fall of wickets: 1-49, 2-61, 3-265
To bat: Hamish Marshall, Jacob Oram, Brendon McCullum, Daniel Vettori, James Franklin, Paul Wiseman.
Tapash Baisya 12-0-70-0 (w-1),
Mushfiqur Rahman 11-1-49-0 (nb-1),
Mohammad Rafique 34-9-85-2 (nb-1),
Enamul Haque Jr 28-3-95-1 (nb-11),
Rajin Saleh 6-0-21-0,
Mohammad Ashraful 1-0-5-0