The 57-year-old late-night host interviewed the 42-year-old actress-writer about a variety of topics, before wrapping the interview with an apology.
"I'd also like to apologize for earlier," he told The Mindy Project star.
"OK, I didn't know if you were going to bring it up, and I felt bad bringing this up," Kaling said.
The pair then clarified what had transpired between them backstage.
"I was backstage getting changed, and I was just in a pair of pants and my bra," the Never Have I Ever executive producer shared.
"And I don't usually do this. I usually wait till they're guests in the wings, but I thought I would just go, 'Hey, have a great show!'" Colbert explained. "So I popped the door open. I knocked, but I did that knock and pop at the same time."
Kaling had one regret about the accidental exchange, saying, "I just thought the whole time, I wish I had worn a sexier bra. It's like, you know, he works hard."
Colbert found the comment hilarious, joking, "That's very thoughtful, so few guests take my feelings into account when I walk in on them undressed."
"I have a 10-month-old! It was, like, a gray bra, just sad," Kaling said, as Colbert assured her he "didn't see a thing."
Though Kaling noted she should have locked the door, Colbert took the blame for the awkward encounter.
"It was entirely my fault. I should have knocked and waited, but your team was great," the host said. "They hurled themselves in front of you like I was an assassin. I couldn't have seen anything if I wanted to."
"I felt like Meghan Markle!" Kaling quipped. "Like, you will not pass!"
Despite the uncomfortable incident, Kaling was thrilled to be appearing on the show. As the mother of 3-year-old Kat and 10-month-old Spencer, she noted that the kid-free getaway was much-needed.
"I was so excited to come to New York. I just want to thank you for letting me be on the show," she told Colbert at the start of the interview. "It's just so nice. I get to get dressed up and backstage there's a little bar set up and I just got tanked. I don't have to change a diaper. I don't have to pretend to watch Daniel Tiger. It's just great!"