The hackers said they had obtained information including "all the customers' secret sexual fantasies and matching credit card transactions".
The site's operator confirmed there had been an "intrusion" but not its extent.
One security expert said a small percentage of the site's user account data had been published online.
The hackers, who called themselves the Impact Team, said they had managed to steal the real names and addresses of the site's users, including those who had previously paid to "delete" their accounts.
Security researcher Brian Krebs said the hackers had published a small percentage of user account data and planned to post more until the website closed.
Ashley Madison told the BBC that it would allow people to delete their profile from the site for free with immediate effect.
The company had previously charged $19 (Â£12) for a "full delete".
The hackers alleged that service was a "complete lie" because some personal information was kept even after a customer had paid for it to be removed.
Ashley Madison said: "The 'paid-delete' option removes all information related to a member's profile and communications activity."
Ashley Madison says it operates in more than 50 countries and has 37 million users, more than a million of whom live in the UK.
It promotes its service with the tagline, "Life is short, have an affair."
The website is owned by Canada-based Avid Life Media.
Avid Life Media said in a statement: "We apologise for this unprovoked and criminal intrusion into our customers' information.
"We have been able to secure our sites, and close the unauthorised access points.
"Any and all parties responsible for this act of cyber-terrorism will be held responsible."
In May, casual dating website Adult Friend Finder was also hacked. Thousands of its customer records were leaked online.
Customer data has been stolen from Ashley Madison, a dating website for married people who wish to cheat on their spouse.