Abdullah had no son but only three daughters. On his death, there was a contest between the second son-in-law Nizam-ud-din and the third Abul Hasan, the eldest Muhammad having been imprisoned by his father Aurangzeb. Abul Hasan came out successful and ascended the throne on 21 April, 1672.
Syed Muzaffar, a general, who had helped the Sultan in his accession, was appointed Mir Jumla. He tried to prevent the Sultan from spending money extravagantly which might be utilized for the building up of an efficient army.
The Sultan resented it and with the help of Madanna, confidential secretary of Muzaffar, removed the latter. Madanna was appointed in his place. His brother Akhanna took over as minister in charge of armed forces.
Madanna, a Brahman, was a diplomat. He was quite apprehensive of the Mughal designs against Golkonda and tried to strengthen its fortifications. He also made arrangements for the transfer of the royal treasures to Kondapalli in case of emergency. He also invited Shivaji, the Maratha leader, at Hyderabad and a treaty was signed which stipulated his active help in case of attack by the Mughals.
Shivaji also agreed to hand over those parts of Karnataka which did not belong to his father after their conquest. Sultan promised to give Shivaji a subsidy of 3,000 huns per day as long as the campaign lasted. Aurangzeb was greatly annoyed with Abul Hasan who was lending a helping hand to the Marathas.
He was already sore about the growing influence of Hindus led by Madanna and his brother Akhanna at the Qutb Shahi court. Aurangzeb expressed his feelings in a letter to his envoy at the Goldkonda court: “This luckless wretch (Abul Hasan Qutb Shah) has given the supreme power in his state to a kafir and made sayyid, shaikhs and scholars subject to that man.
He has publicly allowed all kinds of sin and vice, viz., taverns, brothels and gambling houses. He himself is day and night sunk in the deadly sins through his excessive devotion to drink, and fails to distinguish between Islam and infidelity, justice and oppresssion, sin and piety.
By refusing to respect God’s commands and prohibitions, by sending aid to infidel powers and by promising one lakh of huns to the kafir Shambuji, he has made himself accused before God and man”. The immediate cause was provided by the interception of a letter of Abul Hasan to his agent in whom he had accused Aurangzeb for attacking Sikandar Adil Shah of Bijapur and assured him of his active help.
The Emperor felt greatly infuriated and at once sent prince Muazzam (later on Shah Alam) with a strong contingent to chastize the Golkonda sultan. Abul Hasan fled in panic and took shelter in the fort of Golkonda. The Mughal soldiers indulged in plunder and pillage. Abul Hasan sued for peace.
Shah Alam imposed heavy terms, the payment of an annual tribute of 2 lakh huns and removal of Madanna and Akhanna from service. Abul Hasan was wavering to accept the second condition when a plot was hatched to murder the two brothers.
They were ambushed in a thoroughfare and murdered by Jamshid, the steward of the royal palace. Aurangzeb now ordered the troops to withdraw.
The treaty was, however, a stop-gap arrangement and as soon as Aurangzeb was free from his war with Bijapur, he laid siege to Golkonda fort on 28 January, 1687. The siege lasted 8 months. Abul Hasan fought with courage and determination.
He foiled all the attempts of the Mughals to capture the fort by all possible means, mines, escalades, and artillery fire. The Mughals suffered heavily due to famine, pestilence and enemy attack. The moral of the Mughal soldiers sank very low and it was suggested that the imperialists should raise the siege and leave the fort to Abul Hasan while annexing the rest of the country.
But Aurangzeb was made of a sterner stuff and refused to accept defeat. The defence of the fort was at that time in the hands of that brave and fearless General. Abdur Razzaq Lari surnamed Mustafa Khan. Aurangzeb made tempting offers to him but he scornfully rejected them “shouting that he would fight to death for Abul Hasan”.
But there were others like Abdulla Pani, and Afghan soldier of fortune that were won over by bribery and opened the eastern gate of the fort in the morning of 2 October, 1687.
The Mughal forces entered the fort but met with stiff resistance from a body of troops led by the brave and loyal Abdur Razzaq till he fell down senseless with seventy wounds on his body.
He was taken away from the battlefield and treated by a Hindu and a European physician. Aurangzeb was pleased with his bravery and devotion and gave him a mansab in the Imperial service after his recovery.
Abul Hasan acted with great dignity and remained absolutely calm and unperturbed.
He tried to console the ladies in the harem before he was taken away by his captives and confined in Daulatabad fort where he spent the rest of his life till he breathed his last in 1699 or 1700.