Melancon, the team's closer, has blown four saves this season and has a 4.35 ERA in his first season in San Francisco.
Manager Bruce Bochy says he will see doctors on Wednesday and likely have an MRI, but he doesn't know how long the 32-year-old right-hander will be out.
The Giants signed the 32-year-old reliever to a four-year, $62 million deal this offseason.
In a corresponding move, the Giants recalled right-handed pitcher Dan Slania from Double-A Richmond. The 25-year-old Slania was 1-1 with a 1.93 ERA in three starts with Richmond after a disastrous stint at Triple-A Sacramento earlier this year in which he was 0-8 with a 7.82 ERA in 12 starts.
Information from The Associated Press was used in this report.