The Cowboys traded their No. 18 pick to San Francisco for the 31st pick in the first round and the 74th overall pick (third round).
Frederick (6-foot-3, 312 pounds) made 31 career starts at Wisconsin and has played center and left guard.
Frederick became the ninth offensive linemen drafted in the first round and the first center taken by the Cowboys since Bill Nagy was taken in the seventh round in 2011.
The move by the Cowboys to trade down comes with some questions.
Instead, the Cowboys have Frederick, who has a thick upper body with a solid base. NFL scouts say Frederick is mobile enough to get to the second level and has the ability to play both guard and center. Frederick isn't athletic and doesn't have a lot of burst and has trouble against athletic interior defensive linemen.