Estrada, 26, was hit in the helmet by a pitch from Mark Leiter Jr. in the fifth inning of Saturday's win by the Giants and had to be helped off the field. With Brandon Crawford out of the lineup with a knee injury, the Giants were in need of a shortstop.
Machado, 30, was hitting .312 with a .402 on-base percentage for Triple-A Iowa and will start for the Giants against the Cubs on Sunday night. He has appeared in 172 big league games over four seasons, though he hasn't played in the majors since 2018.
The Cubs received 30-year-old right-hander Raynel Espinal in return for Machado. He had a 5.29 ERA in 19 games for Triple-A Sacramento before being moved.
Righty Tobias Myers has been designated for assignment to make room for Machado on the 40-man roster.