Locksley worked as an analyst last season along with new offensive coordinator Steve Sarkisian. Alabama didn't say Monday what position he would coach.
Tackles and tight ends coach Mario Cristobal has left to become Oregon's offensive coordinator.
Locksley was Maryland's offensive coordinator and quarterbacks coach from 2012-15, serving as interim head coach for the final six games.
He was New Mexico's head coach from 2009-11 and is also a former Illinois offensive coordinator.
Alabama coach Nick Saban says Locksley has ''an outstanding offensive mind'' and is one of the nation's best recruiters.