The team also announced that it has designated right-hander Matt Palmer for assignment. Palmer made three appearances, allowing two earned runs in two innings. He made seven starts with Triple-A Tucson before joining the big league club on May 20.
Ohlendorf, 29, went 4-3 with a 4.61 ERA in 10 starts this season for Triple-A Pawtucket. He had 15 walks and 37 strikeouts in 52 2/3 innings for Boston's top Minor League affiliate.
He opted out of his Minor League contract on June 1 and became a free agent.
The Padres were interested in signing Ohlendorf right before Spring Training but instead signed Jeff Suppan, who was designated for assignment last week after six starts.
Ohlendorf has pitched parts of five Major League seasons with the Yankees (2007-08) and Pirates (2009-11), producing a 14-28 record and 4.77 ERA in 95 games, 64 of them starts.
Ohlendorf, who played wit outfielder Will Venable at Princeton in 2003-04, was selected by the D-backs in the fourth round of the 2004 First-Year Player Draft.
His best season came with the Pirates in 2009, when he went 11-10 with a 3.92 ERA in 29 starts.
The Padres have 11 players on the disabled list, including starters Tim Stauffer, Dustin Moseley, Cory Luebke and Joe Wieland.