McCullum, 35, played six games for Middlesex in last season's competition and will be available for nine matches of this year's tournament between July 7 and August 3.
"I am delighted to be re-joining Middlesex for the coming season and am looking forward to helping the club challenge in the NatWest T20 Blast," McCullum said in a statement.
"I thoroughly enjoyed my time at Middlesex last season and it was an easy decision for me to make when the opportunity arose to return to the Home of Cricket."
He also played three games in the One-Day Cup, notably making 110 against Glamorgan.
Angus Fraser, Middlesex's managing director of cricket, said: "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.