Wikipedia describes his death (via):
After the War of Succession with his brother Dara Shikoh, Aurangzeb (1658-1707) emerged victorious, killed his former adversary and ascended the imperial throne. He had Sarmad arrested and tried for heresy. Sarmad was put to death by beheading in 1661. His grave is located near the Jama Masjid in Delhi, India. Aurangzeb ordered his mullahs to ask Sarmad why he repeated only “There is no God”, and ordered him to recite the second part,”but God”. To that he replied that “I am still absorbed with the negative part. Why should I tell a lie?” Thus he sealed his death sentence. Ali Khan-Razi, Aurangzeb’s court chronicler, was present at the execution. He relates some of the mystic’s verses uttered at the execution stand:
The Mullahs say Ahmed went to heaven, Sarmad says that heaven came down to Ahmed.
“There was an uproar and we opened our eyes from the eternal sleep. Saw that the night of wickedness endured, so we slept again.”
[See original for notes]