The MLB commissioner's office said the positive tests were for selective androgen receptor modulators S-22 (Ostarine) and LGD-4033 (Ligandrol).
Royals general manager Dayton Moore said in a statement Skoglund "unknowingly made a mistake" and "we remain proud of who Eric is as a person and will support him as an organization."
Skoglund was 1-6 with a 5.14 ERA last season. The 26-year-old lefty was in the rotation in April and May, missed the next three months because of an elbow sprain and pitched well in September.
The 6-foot-7 Skoglund made his big league debut in 2017, going 1-2 with a 9.50 ERA in seven games. He was a candidate to begin this season in the rotation, a year after the Royals went 58-104 and finished last in the AL Central.
Skoglund is the first player to be suspended this year under the major league drug program. Ten players were suspended under the program last year, including Robinson Cano, Jorge Polanco and Welington Castillo.
"Unfortunately, when something like this occurs, I immediately think about how much work and dedication our medical staff does communicating to the players about the importance of being careful about what they put in their bodies," Moore said.
"Eric is a tremendous young man, and he unknowingly made a mistake, and he will have to accept his suspension, work hard and be ready to go after the suspension is served," Moore said.