D-backs officials declined to confirm or deny the agreement, with assistant general manager Peter Woodfork saying the club does not comment until a deal is completed.
Lopez would take the place of free agent Orlando Hudson, who is expected to sign elsewhere.
The 28-year-old Lopez hit .283 with a .343 on-base percentage last year with the Nationals and Cardinals. A switch-hitter, he can play any position in the infield and has also played both corners in the outfield.
Lopez made $4.9 million last season. He hit just .234 before being released by the Nats on July 31. Less than a week later, the Cardinals signed him and he hit .385 for the Redbirds.
Steve Gilbert is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.