The surgery is the latest blow to MacGill, 36, who is fighting to win a permanent presence on the team following the retirement of leg-spinner Shane Warne.
Team medical officer doctor Trefor James said MacGill will have hand surgery this week to treat numbness suffered during a recent match against Sri Lanka.
"Stuart MacGill will undergo surgery in Sydney on Thursday for carpal tunnel syndrome in the right hand, a common problem that causes hand numbness," James said.
James said MacGill had had mild symptoms for several months, but the condition only began to affect his bowling during the second Test against Sri Lanka in Hobart last month.
"After consultation with me in Melbourne today a decision has been taken to proceed with surgery as soon as possible," he said.
The surgery will keep MacGill out of cricket for four to six weeks, meaning he is unlikely to be available for selection for the first two of four Test matches against touring India which begin on December 26.
James said there is no other operation planned.
But reports have said that MacGill was prepared to undergo knee surgery to prolong his international career, surrendering his Test position to rival Brad Hogg in the short-term so he could take part in the Pakistan tour next March.
MacGill has already undergone surgery on the knee this season and he struggled in the recent second Test against Sri Lanka, finishing the two-match series with the bowling figures of 5-326.