Before Iqbal, the commanding presence in Urdu poetry was Mirza Asadullah Khan Ghalib (1797–1869) — a poet of dazzling wit, philosophical depth, and a famously difficult, diamond-hard style. Ghalib lived through the collapse of Mughal Delhi and the upheaval of 1857, and turned that loss into verse of permanent power.
Iqbal grew up in Ghalib's shadow, and he acknowledged the debt openly. Among the early poems of his first major Urdu collection, Bang-e-Dara (1924), is one simply titled 'Mirza Ghalib' — a tribute to the older master's genius, his perception of hidden beauty, and his standing in the assembly of Urdu poets. A poet announcing his lineage tells you where he thinks he comes from.
There is a real kinship in their work. Both wrote in Persian as well as Urdu. Both were philosophical poets, restless with easy answers, drawn to paradox. Ghalib's verse circles the riddle of existence with irony and ache; Iqbal's takes that same metaphysical hunger and turns it outward, into a programme for the self and the community.
And there is a difference worth naming. Ghalib is, finally, a poet of the questioning, often sorrowing individual mind. Iqbal took the inherited instrument — the ghazal, the Persianised Urdu, the metaphysical reach — and retuned it toward action, awakening, and motion. To read Ghalib and then Iqbal is to watch a tradition pass from one master to the next, and change its purpose in the handing over.