Gray was a Scotland age-grade international and worked for Scottish Rugby in various coaching roles between 1994 and 2006.
He said working with the senior team is "something special indeed".
Head coach Vern Cotter added: "We're looking forward to adding his experience and passion to the group."
Scotland begin the tournament at home to England on 6 February then visit Wales and Italy before hosting France and finishing in Ireland.
Elaborating on his new role, Gray commented: "The defensive breakdown is an area highlighted by the coaches as an area for improvement, for which I've been given a very specific brief to work alongside defence coach Matt Taylor for the seven-week period of the Six Nations.
"It's a great honour and I'm looking forward to joining up with the squad in camp in St Andrews this Sunday."
Richie Gray has joined Scotland's Six Nations backroom staff as a consultant after three years as South Africa's specialist breakdown coach.