Leyva, who also worked with Pittsburgh's infielders, will now serve as a senior advisor in the Pirates' baseball operations department.
"We have great respect and appreciation for both men. We thank them for their time and effort as part of our Major League team and the Pirates organization," Pirates general manager Neal Huntington said in a statement. "It was a difficult decision, but we felt it was the right time to make this change on our Major League staff."
Both coaches were under contract and expected to return next year. Before the Bucs' last game of the season, Huntington said the Pirates' coaches "did a nice job this year."
"It's easy to point fingers and to say this area isn't good enough. The first finger that should be pointed is in my direction," Huntington said Oct. 2 in St. Louis. "Are there areas we need to improve? In each and every area, we need to improve. That starts with me."
Sofield may be taking the fall for the Pirates' poor baserunning. He admitted to his share of bad sends from third base to home plate, and the Bucs graded out as one of the Majors' worst teams on the basepaths this year
Pittsburgh ranked 23rd among all Major League teams according to FanGraphs' "BsR" baserunning metric at seven runs below league average. Pittsburgh ranked 12th in that category in 2015, sixth in 2014 and 14th in 2013.
Sofield, Hurdle's longtime friend, has a wide variety of coaching and managing experience, serving six years as a Minor League manager and coaching at the collegiate level for the University of Utah and the University of South Carolina Beaufort. Last offseason, Sofield interviewed for the Padres managerial job that wound up going to Andy Green.
Leyva managed the Phillies from 1989-91 and worked as a coach for the Cardinals, Blue Jays and Brewers before joining the Pirates staff following the 2011 season.
"We look forward to Nick's continued impact in his future role with the Pirates," Huntington said. "Nick has held nearly every coaching position at the Major League level and at the Minor League level, including Major League manager, in his extensive career and will be a quality mentor for our Minor League managers, coaches and players throughout our system."
The Pirates did not announce a replacement for either departing coach.