The Giants announced as much Wednesday, noting the surgery will take place Thursday in Los Angeles.
Cueto has struggled to stay on the field since the start of last season. The two-time All-Star has made only 34 starts during that span, including nine in 2018.
This season started spectacularly for Cueto, who had an ERA of 0.84 in five starts from March 30 to April 28. The Giants placed him on the disabled list on May 1 because of inflammation in his pitching elbow.
After missing two months, Cueto returned to make four starts in July. The 32-year-old wasn't nearly as effective, though, as he posted a 6.86 ERA with 16 earned runs and seven homers allowed in 21 innings pitched.
On July 30, Giants manager Bruce Bochy told reporters there was "quite a possibility" that Cueto would need Tommy John surgery.
The Giants have struggled to stay in playoff contention without Cueto in their rotation behind Madison Bumgarner. They are 55-54 and 4.5 games out of the second wild-card spot in the National League.
Look for Ty Blach to potentially move back into San Francisco's starting rotation. He's made 12 starts in 31 appearances with a 4.48 ERA in 2018.