The deal, announced Thursday, includes an invitation to spring training.
The 30-year-old Luebke put together a 10-12 record in 55 appearances (25 starts) with the Padres from 2010-12. Luebke posted a 3.86 ERA in seven minor league appearances in the San Diego organization in 2015.
Luebke has undergone a pair of Tommy John surgeries on his left elbow, once in 2012 and again in 2014.
The Pirates are looking for potential help at the front end of the bullpen heading into spring training. Pitchers report next week.