The 35-year-old, who retired from international cricket last year after more than 400 appearances in all formats, featured six times for Middlesex in the competition in 2016.
McCullum averaged 33 for the county last season, with a highest score of 87, and will return in July.
"It was an easy decision to return to the home of cricket," he said.
Before retiring in February, McCullum played 101 Tests, 260 one-day internationals and 71 T20 games for the Kiwis, scoring more than 14,000 runs in the process.
He also hit 398 sixes for New Zealand in all forms of the game - 107 in Tests, 200 in ODIs and 91 in T20 - and 1,552 fours
"Brendon had a hugely positive influence on the club in 2016 and I'm sure he will have a similar impact this summer," said director of cricket Angus Fraser.
"With Brendon on board and the other exciting players we have, watching Middlesex play T20 cricket in 2017 should be an exciting and enjoyable experience."
Former New Zealand captain Brendon McCullum is to rejoin Middlesex for nine 2017 T20 Blast group matches.