Cook, who was baptized as a child, said he has "great reverence for religious freedom," but said faith should not be used as a tool to discriminate.
"The days of segregation and discrimination marked by 'Whites Only' signs on shop doors, water fountains and restrooms must remain deep in our past," he added.
"We must never return to any semblance of that time. America must be a land of opportunity for everyone."
Cook repeated his earlier statement that "Apple is open for everyone" and said he hopes more people will join his campaign against intolerance.
The Indiana bill sparked fury among activists, athletes and Hollywood stars who came out strongly against it.
Same-sex marriage is now recognized in 37 states after the US Supreme Court in 2013 ruled that federal law could not discriminate against wedded lesbian, gay, bisexual, and transgender (LGBT) couples.
The legislation adopted in Indiana, however, is styled on the Religious Freedom Restoration Act, a 1993 federal law that makes it illegal to "substantially burden" an individual's freedom of religion.