Castro, 39, is a 17-year veteran who started his career with the Dodgers, had four stints with the club and also played for the Reds, Orioles, Twins and Phillies.
He will be involved in player development and evaluating on the Major and Minor League levels.
"It was time for me to make the decision to end my playing career," Castro said in a club release. "I'm honored that Ned thought of bringing me back to the organization where I first signed as a young kid more than 20 years ago. I'm very excited to once again work for the Dodgers in a new and challenging role."