James was called out over the lyric - which comes from a song by US rapper 21 Savage - after he shared it with his 45.8m followers on Instagram.
US journalist Darren Rovell was among those drawing attention to the post, saying it was "offensive".
But James said it was not his intent "to hurt anyone" with Saturday's post.
"Apologies, for sure, if I offended anyone," he told sports channel ESPN on Sunday. "That's not why I chose to share that lyric. I always [post lyrics]. That's what I do. I ride in my car, I listen to great music, and that was the byproduct of it.
"So I actually thought it was a compliment, and obviously it wasn't through the lens of a lot of people."
Many of his fans had come out in support of James, who joined the Los Angeles Lakers in July on a four-year deal worth $154m (£116m).
But Rovell took to Instagram himself to detail exactly why it was offensive.