Bristol Palin has apologized for the offensive comments she and her sister Willow made during a Facebook war this week ... in which Willow used a homophobic slur to attack a schoolmate.

Bristol went back to Facebook last night and posted a message that read, "Willow and I shouldn't have reacted to negative comments about our family. We apologize."

She added, "On a nicer note, thank you for supporting the great competition in Dancing with the Stars!"

A few hours later, Bristol posted another message that said, "Thank you supporters who continue to support. The haters are already pulling out all the stops this week to destroy."