The Marlins also sent cash considerations to Oakland. The amount of money wasn't disclosed, but sources told ESPN's Jeff Passan that Miami sent more than $4 million to Oakland to cover the remainder of Marte's contract.
"We felt like Starling was frankly the best position player that was out there on the market," A's general manager David Forst said before the team's game in San Diego. "We've always said when the team performs and puts itself in a playoff position, it's on us to do whatever we can to try and help them.''
The A's, who began the day six games behind AL West leader Houston, also acquired left-handed reliever Andrew Chafin this week from the Chicago Cubs.
"We've added two really solid pieces to help this team over the next two months,'' Forst said.
Marte, 32, is hitting .306 with seven home runs and 25 RBIs and has 22 stolen bases in 25 attempts for the Marlins. He missed time this season with a fractured rib.
"New horizons open, and I will continue to give my best wherever I go," Marte tweeted.
Luzardo, 23, is 2-4 with a 6.87 ERA in 38 innings pitched. He has made 13 appearances, including six starts.He was sidelined for four weeks in May after he broke the pinkie on his pitching hand when he thumped a table while playing a video game.
Marte, who is a career .288 hitter, is scheduled to become a free agent after this season. Luzardo is under team control through 2025.
Miami made the deal after it was unable to reach an agreement with Marte on a contract extension.
The Marlins are last in the NL East and are expected to make more moves before the trade deadline Friday.
Marte was an All-Star for Pittsburgh in 2016, and the A's are his fourth team. He joins an outfield that also includes Ramon Laureano and Mark Canha.
The Associated Press contributed to this report.
Marte's best moments from the 2021 season
Check out Starling Marte's best moments from the 2021 season as he's traded to the A's.