The meeting took place before Modi went to address a Bharatiya Janata Party's (BJP) core committee meeting in the city where he was accorded a rousing reception.
Details of what transpired at the Modi-Thackeray meeting were not available. The Shiv Sena is the oldest ally of the BJP.
Party leaders including state president Devendra Fadnavis and hundreds of activists welcomed him at the Mumbai airport.
This is Modi's first trip to Mumbai after taking over as the party's national poll campaign committee chief.
Later, he was closeted with state leaders to discuss the strategy for the next Lok Sabha and Maharashtra assembly elections, both due next year.
Prior to the meeting, a BJP spokesman said, "The BJP-Shiv Sena alliance has always been very strong in the state."
Modi is also scheduled to launch a new book, "Beyond A Billion Ballot," authored by party ideologue Vinay Sahasrabuddhe.
Photos: Salman Khan returns from Jodhpur to Mumbai
Pics: Sidharth Shukla-Rashami Desai's sizzling chemistry at TV show launch
Ooh La Lana! WWE Diva flaunts sexy curves in these 30 pictures
15 'peach' perfect photos of Priyanka Chopra at People's Choice Awards 2017
62 going on 16: These photos of Rekha prove she is 'forever young'