The Nationals made Marrero, a right-handed hitter, the 15th overall pick in the 2006 First-Year Player Draft.
Marrero, 25, has posted a .232/.256/.272 slash line in 39 major league games in 2011 and 2013, with five doubles, 11 RBIs, four walks and 31 RBIs in 133 plate appearances. He went 2-for-16 with an RBI this season.
Marrero batted .270/.331/.402 with 17 doubles, two triples, 11 home runs and 59 RBIs in 111 games at Triple-A Syracuse this season. He's a career .282/.350/.445 hitter in eight minor league seasons.
Though primarily a first baseman, Marrero also has played 114 games in left field and 13 in right in the minors.
Baseball America rated Marrero as the 27th-best prospect in baseball back in 2008.
Baseball American's Matt Eddy first tweeted news of the signing.
Also, third baseman Manny Machado will begin to do some light running this week as he continues to progress from knee surgery.
The Orioles will get a closer look at Machado during the Jan. 13-16 mini-camp in Sarasota. They remain hopeful that he will be ready for the March 31 opener against the Boston Red Sox at Camden Yards.
Machado underwent surgery in October to repair a torn ligament in his left knee. Initial recovery time was estimated at six months.
The 75-minute procedure included an arthroscopy and open reconstruction of the medial patellar femoral ligament. A hamstring tendon was used to graft a replacement for the ruptured ligament.