McCullum told a news conference in Christchurch that the second Test against Australia which starts at Hagley Oval on February 20 would be his 101st and last.
"I've loved my opportunity to play for and captain the Black Caps, but all good things have to come to an end, and I'm just grateful for the wonderful experience of playing for my country," said McCullum, who has struggled with back problems for several years.    
The explosive batsman, who has scored 6,273 runs in 99 tests at an average of 38.48, took charge of New Zealand in all three formats of the game at the start of 2013 after Ross Taylor was controversially dropped as skipper by coach Mike Hesson.
McCullum led New Zealand unbeaten through seven Test series until the recent reverse in Australia, and to a first 50-overs World Cup final last year where they were again beaten by their trans-Tasman Sea rivals.
Originally a wicketkeeper-batsman who gave up the gloves because of the chronic back problems, McCullum said earlier this year he was taking it one game at a time and rumours of his impending retirement have been rife.

Latest News from Sports News Desk