On December 10, 2014, Barnes was traded to the Los Angeles Dodgers, along with Chris Hatcher, Andrew Heaney, and Enrique Hernández, in exchange for Dan Haren, Dee Gordon, Miguel Rojas and cash. He was assigned to the AAA Oklahoma City Dodgers. On May 23, 2015, he was called up to the Major Leagues for the first time when Yasmani Grandal went on the 7-day DL with a concussion.