The long-serving boss will leave the Greens after nearly 15 years in charge.
McCann replaces Alan Dowson, who left the Beveree to take the Woking job last week after three-and-a-half fantastic years.
The 45-year-old took Hendon to the Isthmian League play-off final last season, but, like Hampton, they fell just short- losing out on promotion on penalties.
Hampton chairman Graham Wood told the club’s website: “Our initial thoughts on likely candidates and subsequent research put Gary at the top of our list.
“The vacancy was advertised but we knew Gary was under contract to Hendon, so we requested permission to speak to him. Permission was granted and we are grateful for Hendon’s co-operation throughout the process.
“Following today’s interview, we are now fully satisfied he is the right man for the job and are pleased to announce that terms have been agreed and Gary is Hampton’s new manager.”