Self publishing was generally positive in that it gave new authors the opportunity to get their content published, the company said.
"However we are disgusted by these particular titles, find this unacceptable and we in no way whatsoever condone them. It is our policy not to feature titles like those highlighted and we have processes in place to screen them out."
The company said it currently offered more than one million titles through its eBooks partner Kobo.
"Due to the massive amount of self publishing a number of these titles have got through the screening process. We are taking immediate steps to have them all removed."
According to The Guardian, some of the pornographic ebooks featured rape and bestiality.
A search for the term "daddy" on whsmith.co.uk brought up pornographic ebooks alongside stories for children.
WHSmith said it would keep its website off-line until all the eBooks had been removed and it was certain no more offending titles were available.
"When our website goes back online it will not display any self-published material until we are completely confident that inappropriate books can never be shown again. We sincerely apologise for any offence caused."