Question: which mughal emperor shifted capital from agra to delhi
Answer: In the mid-17th century , the Mughal Emperor Shah Jahan ( 1628 -- 1658 ) built the city that sometimes bears his name Shahjahanabad , the seventh city of Delhi that is more commonly known as the old city or old Delhi .