Born in Puerto Madryn, Lema started his football career aged 8 at hometown club Guillermo Brown. He debuted for their senior team in 2007 and left the club in 2009.[2]
A year later, Lema joined Newell's Old Boys and made his Argentine Primera División debut in a 0–0 home draw to Godoy Cruz in November.[2] After playing 12 matches with the former side, he moved on loan to Tigre in June 2011,[2][3] and there he played 11 matches, scoring one goal.[2] In July 2012, aged 22, he transferred to Quilmes,[2][3] with whom he would play 40 matches and score 2 goals before moving to Belgrano in 2014.[2] In his four-year spell with the latter, he became the club's defender with the most league goals ever, 16 in 123 matches. Moreover, he debuted in Copa Sudamericana in 2015.[2]
In June 2018, Lema moved to Portugal and signed a five-year contract with S.L. Benfica.[4] In February 2019, after playing only two matches for the Lisbon side in October, he was loaned to Uruguayan club Peñarol until June 2019, with option to buy.[5] Afterwards, he was loaned out to Newell's Old Boys for 2019–20.[6] He left Benfica on 1 October 2020 to join Saudi Arabian club Damac FC.[7]
On 18 February 2021, Lema returned to Newell's Old Boys, and signed a contract until December 2021.[8]
In November 2022, Lema joined fellow Primera División club Lanús ahead of the 2023 season.[9]
On 8 January 2024, Lema moved to Boca Juniors for a reported fee of $500.000, signing a two-year contract.[10]