The 32-year-old Australia lock, who has captained his country for 16 of his 62 Tests, joined Harlequins in 2015.
Horwill, who previously played for Super Rugby outfit Queensland Reds, will succeed England scrum-half Danny Care as Quins skipper.
"I'm very humbled and honoured to be asked to captain such a great club," Horwill told Quins' website.
Care, who had led the side since replacing Joe Marler in 2015, said: "I feel that it is the right time for a freshen-up, and for someone else to take over."
Director of rugby John Kingston added: "I would like to extend my sincere thanks to Danny for his huge effort and energy whilst being captain of Harlequins.
"James has shown unconditional commitment to the cause since he arrived at the club. I am immensely looking forward to working with him as we seek to build on our Champions Cup qualification."
Quins finished sixth in the table in 2016-17, 14 points off the top four, after 11 wins and 11 defeats in their 22 league games.
James Horwill has been named as Harlequins' new captain ahead of the 2017-18 Premiership season.