The 23-year-old Kyrgios reacted after he was taunted by a spectator sat behind him in the first set of his 6-3 6-1 victory against Dusan Lajovic.
"Did you get a free ticket? Why are you watching me on a Sunday night?" Kyrgios shouted up to the stands. "You got nothing else to do on a Sunday night?"
The man in return gestured at Kyrgios, who three points later shot back with "Bro, where's your fam?"
While his female companion remained seated, the spectator was eventually escorted out by stewards and Kyrgios waved to him from the court.
Addressing the issue after the game, the 23-year-old said that he "had a bit of fun with it.
"I knew that I was going to get him kicked out," he added. "I loved it, I loved every single bit of it. I think the crowd loved it."
Kyrgios explained how the incident originated with the man joking about his haircut.
"At a change of ends he literally just said, 'You're a d*** .... He said I had a s***ty haircut. And you know what? I haven't been to a barber shop in a couple of days, so he was pretty right," said the world No. 33.
On the court, Kyrgios produced a bag of tricks as he swept past Lajovic.
The first set alone saw him twice experiment with underarm serves -- one of which resulted in an ace -- and win a rally that included a tweener (through-the-legs shot).
A semifinalist in Miami in 2016 and 2017, the Australian next plays Croatian Borna Coric in the round of 16.
Kyrgios has hit the headlines a number of times during this tournament. In an earlier doubles match, he called the umpire a f***ing disgrace" and smashed his racket on the floor in frustration.
He also called out Angelique Kerber after the former world No. 1 told her third round opponent Bianca Andreescu she was "the biggest drama queen" as they shook hands at the end of the match.
"Bruh you said she is a drama queen and then post this," Kyrgios wrote on Twitter, replying to Kerber's message congratulating Andreescu on the victory.
Last month, the Australian was criticized by Rafa Nadal after his defeat of the Spaniard at the Mexican Open, a tournament Kyrgios went on to win.
"[He] lacks respect for the public, the rival and himself," said Nadal after a match that again saw Kyrgios deploy an underarm serve.
"He's a player who has the talent to win grand slams -- a player who can fight for the top rankings -- but there's a reason he is where he is."
World No. 1 Novak Djokovic needed three sets to defeat Argentina's Federico Delbonis 7-5 4-6 6-1 in Miami to set up a last 16 clash against Roberto Bautista Agut.
Roger Federer will be aiming to join him on Monday when he faces Serbian Filip Krajinovic.