He said that he had been open with many people about his sexual orientation, including plenty of his colleagues at Apple, but he hadn't publicly acknowledged it either, until now.
"Being gay has given me a deeper understanding of what it means to be in the minority and provided a window into the challenges that people in other minority groups deal with every day. It's made me more empathetic, which has led to a richer life. It's been tough and uncomfortable at times, but it has given me the confidence to be myself, to follow my own path, and to rise above adversity and bigotry. It's also given me the skin of a rhinoceros, which comes in handy when you're the CEO of Apple," Cook added.
Cook's disclosure was greeted by a flood of congratulatory comments on Twitter.
Apple Chairman Art Levinson called Cook "courageous."
Cook also cited Robert F. Kennedy and the Rev. Dr. Martin Luther King Jr., whose framed photos are on his office wall, as his inspiration for publishing his article on Thursday.
"I don?t pretend that writing this puts me in their league," he wrote. "All it does is allow me to look at those pictures and know that I?m doing my part, however small, to help others."
"We pave the sunlit path toward justice together, brick by brick. This is my brick," he wrote.