Todd Archer of ESPN first reported details of the injury Monday and noted Cowboys executive vice president Stephen Jones said the wideout will "miss some time" to recover. David Moore of the Dallas Morning News reported the procedure took place in February.
It's unclear how the injury occurred.
Williams could end up missing the team's entire offseason workout program, but he's expected to return for the start of training camp, per Moore.
The 28-year-old Dallas native is coming off a 2017 campaign that saw him make a career-high 53 catches for 568 yards, but he didn't score any touchdowns for the first time in his five NFL seasons.
Pro Football Focus graded him in the "poor" category as the league's No. 73 receiver.
His injury creates another level of uncertainty at the position for the Cowboys. The front office still hasn't decided what to do with Dez Bryant, the team's longtime top target, whose cap hit for the 2018 season would be $16.5 without a restructured deal, per Spotrac.
Dallas signed Allen Hurns last week to provide depth on the outside. He might overtake Williams as the No. 2 wideout during training camp and the preseason, assuming Bryant returns.