Is opposition to reaction, reactionary? Or a loathing of religious bigotry, bigoted? To slam "Islam as oppressive of gay and women's rights", said a Guardian columnist last week, is to manifest the "progressives' prejudice". True liberals did not criticise illiberal religion. They denounced criticism of prejudice as prejudiced.

Arguing against what has become orthodoxy is difficult because most of the people who hold to its tenets are not malicious, just indolent and a little frightened. They have a genuine fear of racism, however ill thought through, and that speaks to their credit. Argument must be joined, however, because supporters of identity politics bundle the objects of their concern into racial and religious boxes, and label them "handle with care".

They deny individuality. They ignore conflicts within ethnic minorities. They behave as if women with brown skins should not have the same rights as women with white skins, although they lack the intellectual honesty to make their racism of low expectations explicit. For all the excuses you can make for them, theirs is a species of malice, albeit closer to a sin of omission than commission.

This week sees a reply that is also an admonishment with the publication of the summer's second "escape memoir" – if I may coin the term. Despite its title, Alom Shaha's The Young Atheist's Handbook is as much an autobiography as an argument against religion.

He describes how the early death of his mother led him to think about the problem of evil, the oldest and most effective argument against a benevolent and omnipotent god. He interrupts his criticisms of theology with accounts of his experience of racism. British culture being the way it is, he knows he must provide his anti-racist credentials, and devote space to counter the accusation that he became a "coconut" – "brown on the outside, white on the inside" – when he abandoned the religion of his parents.

Shaha explains that he is against all forms of racism, including religious discrimination. How, given his experience of Paki-bashing in the south London of the 1980s, could he be otherwise? But he adds that he was driven to write because "people often unfairly conflate" criticisms of the ideology of Islam with racism. "As a believer in human rights and justice, I find this abhorrent." It tells you much about Britain that he needs to spell this out.

Shaha now teaches physics at a London comprehensive. If the style is a guide to the man, he is gentle and persuasive – the type of teacher you would have loved to have had educate you. He could not be more different from Maajid Nawaz, who released his autobiography Radical last week.

Nawaz, too, experienced racial violence – in Southend, rather than south London – and grew up amid the multiculturalism of the New Labour years. Rather than rejecting state-sponsored sectarian identities, Nawaz "celebrated" his multicultural "difference" by joining Hizb ut-Tahrir. The extremist group sent him to Lahore to help Pakistan's descent into theocracy by recruiting army officers to the Islamist cause. His superiors then moved him on to Egypt, where Nawaz's luck ran out.

Mubarak's secret police jailed and tortured him. While he was recovering in prison, he found his means of intellectual escape. He studied the history of religion and read the classics of English literature. He started asking all the awkward questions.

Why should the solution to secular Arab dictators be Islamist Arab dictators? Why did war in Afghanistan and Iraq mean his friends needed to silence critical thinking in Britain and denounce it as heresy and blasphemy?

With the help of Amnesty International, Nawaz got out of jail. He lost his wife and friends because of his conversion to a liberal version of Islam. Undeterred, he went on to shock his former associates further by joining London's Quilliam Foundation. The thinktank defends religious liberty, including the freedoms of religious reactionaries. It opposes all attempts by the state to impose religion by law. For upholding this modest programme, Nawaz was denounced as a "neocon" by leftists while his old partners in the Islamist cults sent him death threats.

In this minatory climate, he and Shaha were lucky to find publishers. Literary London, and European and north American publishing houses, are still in a post-Rushdie funk that the murder of Theo van Gogh and attempts on the lives of the Danish cartoonists have done nothing to ease. One editor told Shaha that his terrified colleagues would not let him work with him.

Hearteningly, rival publishers found the courage to print both autobiographies, and I can see why. Shaha has written a quietly devastating condemnation of religious sexual repression. He examines forced marriage and genital mutilation, and pays due attention to the oppression of women in Islam. "The penis of the Elected never softens," he says as he makes his point by quoting a 15th-century Koranic commentator's description of a misogynist paradise. "The erection is eternal; the sensation that you feel each time you make love is utterly delicious and out of this world. Each chosen one will marry 70 houris, besides the women he married on earth, and all will have appetising vaginas."

Naturally, Shaha is as critical of Catholic prohibitions against contraception in Aids-ridden Africa and Orthodox Jewry's assaults on "immodest" women in Israel. He at least understands that Christianity and Judaism are not "better" than Islam. The Enlightenment just did a better job of battering down their prejudices. As the behaviour of our supposedly moderate Anglican bishops shows, they could do with a few more kicks.

Nawaz, meanwhile, has written a redemptive account of how violence seduced and then repelled him. He ends by describing a western culture that has turned sour. The rightwing commentator Glenn Beck attacked him for supporting supposedly dangerous organisations that connected western digital activists to the Tahrir Square revolutionaries. Meanwhile, what he nicely calls the "regressive left" accused him of being an "orientalist" because he would not accept that western crimes were the root cause of religious extremism.

Both the prejudiced right and prejudiced left wanted to keep ethnic minorities in their boxes; sealed and labelled. They must be either a threat or a victim. Neither will allow them to be the free-thinking citizens of a democracy with the right to follow their own arguments wherever they may take them.

• The headline on this article was amended at 15.05 on Sunday 15 July