It was said by Leo Tolstoy.
Tolstoy said this at the beginning of his novel "Anna Karenina": Happy families are all similar, and unhappy families are each unhappy in their own way.
This famous saying comes from "Anna Karenina", one of the masterpieces of the famous Russian writer Leo Tolstoy. And this quote is the first sentence of its opening chapter.