To make room on the 40-man roster for Ogando, the Pirates designated infielder Jason Rogers for assignment.
Ogando, 27, had an 0-0 record with a 2.30 ERA in 14 appearances for Marlins in 2016. He spent most of the season with Triple-A New Orleans and had a 3.33 ERA in 22 appearances with New Orleans last season.
Ogando was on 15-day disabled list because of a broken rib he suffered when he collided with Philadelphia Phillies hitter Cesar Hernandez while covering first base on May 8.
Rogers hit .080 with no homers in 23 games for the Pirates last season.