Avicenna was born c. 980 in Afshana, a village near Bukhara (in present-day Uzbekistan), the capital of the Samanids, a Persian dynasty in Central Asia and Greater Khorasan. His mother, named Setareh, was from Bukhara; his father, Abdullah, was a respected Ismaili scholar from Balkh, an important town of the Samanid Empire, in what is today Balkh Province, Afghanistan. His father worked in the government of Samanid in the village Kharmasain, a Sunni regional power. After five years, his younger brother, Mahmoud, was born. Avicenna first began to learn the Quran and literature in such a way that when he was ten years old he had essentially learned all of them.
A number of theories have been proposed regarding Avicenna's madhab (school of thought within Islamic jurisprudence). Medieval historian Ẓahīr al-dīn al-Bayhaqī (d. 1169) considered Avicenna to be a follower of the Brethren of Purity. On the other hand, Dimitri Gutas along with Aisha Khan and Jules J. Janssens demonstrated that Avicenna was a Sunni Hanafi. However, the 14th century Shia faqih Nurullah Shushtari according to Seyyed Hossein Nasr, maintained that he was most likely a Twelver Shia. Conversely, Sharaf Khorasani, citing a rejection of an invitation of the Sunni Governor Sultan Mahmoud Ghazanavi by Avicenna to his court, believes that Avicenna was an Ismaili. Similar disagreements exist on the background of Avicenna's family, whereas some writers considered them Sunni, some more recent writers contested that they were Shia.
According to his autobiography, Avicenna had memorised the entire Quran by the age of 10. He learned Indian arithmetic from an Indian greengrocer,ءMahmoud Massahi and he began to learn more from a wandering scholar who gained a livelihood by curing the sick and teaching the young. He also studied Fiqh (Islamic jurisprudence) under the Sunni Hanafi scholar Ismail al-Zahid. Avicenna was taught some extent of philosophy books such as Introduction (Isagoge)'s Porphyry (philosopher), Euclid's Elements, Ptolemy's Almagest by an unpopular philosopher, Abu Abdullah Nateli, who claimed philosophizing.
As a teenager, he was greatly troubled by the Metaphysics of Aristotle, which he could not understand until he read al-Farabi's commentary on the work. For the next year and a half, he studied philosophy, in which he encountered greater obstacles. In such moments of baffled inquiry, he would leave his books, perform the requisite ablutions, then go to the mosque, and continue in prayer till light broke on his difficulties. Deep into the night, he would continue his studies, and even in his dreams problems would pursue him and work out their solution. Forty times, it is said, he read through the Metaphysics of Aristotle, till the words were imprinted on his memory; but their meaning was hopelessly obscure, until one day they found illumination, from the little commentary by Farabi, which he bought at a bookstall for the small sum of three dirhams. So great was his joy at the discovery, made with the help of a work from which he had expected only mystery, that he hastened to return thanks to God, and bestowed alms upon the poor.
He turned to medicine at 16, and not only learned medical theory, but also by gratuitous attendance of the sick had, according to his own account, discovered new methods of treatment. The teenager achieved full status as a qualified physician at age 18, and found that "Medicine is no hard and thorny science, like mathematics and metaphysics, so I soon made great progress; I became an excellent doctor and began to treat patients, using approved remedies." The youthful physician's fame spread quickly, and he treated many patients without asking for payment.
Ibn Sina's first appointment was that of physician to the emir, Nuh II, who owed him his recovery from a dangerous illness (997). Ibn Sina's chief reward for this service was access to the royal library of the Samanids, well-known patrons of scholarship and scholars. When the library was destroyed by fire not long after, the enemies of Ibn Sina accused him of burning it, in order for ever to conceal the sources of his knowledge. Meanwhile, he assisted his father in his financial labors, but still found time to write some of his earliest works.
When Ibn Sina was 22 years old, he lost his father. The Samanid dynasty came to its end in December 1004. Ibn Sina seems to have declined the offers of Mahmud of Ghazni, and proceeded westwards to Urgench in modern Turkmenistan, where the vizier, regarded as a friend of scholars, gave him a small monthly stipend. The pay was small, however, so Ibn Sina wandered from place to place through the districts of Nishapur and Merv to the borders of Khorasan, seeking an opening for his talents. Qabus, the generous ruler of Tabaristan, himself a poet and a scholar, with whom Ibn Sina had expected to find asylum, was on about that date (1012) starved to death by his troops who had revolted. Ibn Sina himself was at this time stricken by a severe illness. Finally, at Gorgan, near the Caspian Sea, Ibn Sina met with a friend, who bought a dwelling near his own house in which Ibn Sina lectured on logic and astronomy. Several of Ibn Sina's treatises were written for this patron; and the commencement of his Canon of Medicine also dates from his stay in Hyrcania.
Ibn Sina subsequently settled at Rey, in the vicinity of modern Tehran, the home town of Rhazes; where Majd Addaula, a son of the last Buwayhid emir, was nominal ruler under the regency of his mother (Seyyedeh Khatun). About thirty of Ibn Sina's shorter works are said to have been composed in Rey. Constant feuds which raged between the regent and her second son, Shams al-Daula, however, compelled the scholar to quit the place. After a brief sojourn at Qazvin he passed southwards to Hamadãn where Shams al-Daula, another Buwayhid emir, had established himself. At first, Ibn Sina entered into the service of a high-born lady; but the emir, hearing of his arrival, called him in as medical attendant, and sent him back with presents to his dwelling. Ibn Sina was even raised to the office of vizier. The emir decreed that he should be banished from the country. Ibn Sina, however, remained hidden for forty days in sheikh Ahmed Fadhel's house, until a fresh attack of illness induced the emir to restore him to his post. Even during this perturbed time, Ibn Sina persevered with his studies and teaching. Every evening, extracts from his great works, the Canon and the Sanatio, were dictated and explained to his pupils. On the death of the emir, Ibn Sina ceased to be vizier and hid himself in the house of an apothecary, where, with intense assiduity, he continued the composition of his works.
Meanwhile, he had written to Abu Ya'far, the prefect of the dynamic city of Isfahan, offering his services. The new emir of Hamadan, hearing of this correspondence and discovering where Ibn Sina was hiding, incarcerated him in a fortress. War meanwhile continued between the rulers of Isfahan and Hamadãn; in 1024 the former captured Hamadan and its towns, expelling the Tajik mercenaries. When the storm had passed, Ibn Sina returned with the emir to Hamadan, and carried on his literary labors. Later, however, accompanied by his brother, a favorite pupil, and two slaves, Ibn Sina escaped from the city in the dress of a Sufi ascetic. After a perilous journey, they reached Isfahan, receiving an honorable welcome from the prince.
Later life and death
The remaining ten or twelve years of Ibn Sīnā's life were spent in the service of the Kakuyid ruler Muhammad ibn Rustam Dushmanziyar (also known as Ala al-Dawla), whom he accompanied as physician and general literary and scientific adviser, even in his numerous campaigns.
During these years he began to study literary matters and philology, instigated, it is asserted, by criticisms on his style. A severe colic, which seized him on the march of the army against Hamadan, was checked by remedies so violent that Ibn Sina could scarcely stand. On a similar occasion the disease returned; with difficulty he reached Hamadan, where, finding the disease gaining ground, he refused to keep up the regimen imposed, and resigned himself to his fate.
His friends advised him to slow down and take life moderately. He refused, however, stating that: "I prefer a short life with width to a narrow one with length". On his deathbed remorse seized him; he bestowed his goods on the poor, restored unjust gains, freed his slaves, and read through the Quran every three days until his death. He died in June 1037, in his fifty-eighth year, in the month of Ramadan and was buried in Hamadan, Iran.