BEVERLY HILLS, Calif. — On the first day of summer, two days before the release of his new album, “Grateful,” the hip-hop producer DJ Khaled was sitting in a powder room in his mansion here: a turreted affair across the street from the home of Slash, the Guns N’ Roses guitarist. Befitting a superhero (of social media, at least), the man born as Khaled Mohamed Khaled was wearing a black polyester cape — but it was merely for that most mortal of obligations, a haircut.

As a barber circled him, brushing black dye into his buzz cut and beard, Mr. Khaled scrolled through the infinite stream of comments from his 6.7 million Instagram followers; fist-bumped guests that Kiko, his personal assistant, let into the house; debated whether to turn on the pool heater before punting the decision to his fiancée, Nicole Tuck, who was in New York; and waxed poetic about gardening, the pastime that has kept him grounded during his ascent from Miami disc jockey to auteur of ubiquitous club bangers like “Wild Thoughts” (his song featuring Rihanna and a Carlos Santana sample that is currently high on the charts) and “I Got the Keys.”

“Don’t forget, if we didn’t have this house built, these streets, what would be here?” he said, gesturing at the cobblestone driveway, where two uniformed workers were cleaning the interior of his bright blue Rolls-Royce. “Trees, flowers, Mother Nature.”