The people spoke to The Associated Press on condition of anonymity because they were not authorized to discuss the move publicly.
Melvin will be returning to the Bay Area where he grew up, played for the Giants, and then managed the Oakland Athletics from 2011-21.
An introductory news conference is expected Wednesday.
Melvin had one year left on his contract with San Diego but leaves amid reports of friction with general manager A.J. Preller.
Melvin managed the Padres for two seasons, reaching the 2022 NL Championship Series but then missing the playoffs this season with a $258 million payroll, the third-highest in the majors.
In 2,942 games as an MLB manager, Melvin has a winning percentage of .516.
He managed Seattle, Arizona, and Oakland before taking over the Padres in 2022.