In 2012, Esparza became a recurring actor on the long-running NBC drama series ' as Manhattan Assistant District Attorney Rafael Barba, starting in the third episode of the show's 14th season, "". He appeared in 11 episodes of the show's 14th season. On July 17, 2013, he was promoted to series regular for the show's 15th season. His character became the first series-regular ADA since Stephanie March in the 11th season and the first regular male ADA in series history. His role on "SVU" was not his first "Law & Order" role, however, as he had previously portrayed an ADA in a 2009 episode of ', and a suspect in a 2010 episode of the original "Law & Order". On February 7, 2018, Esparza left "SVU" in the episode "” after six seasons on the show.