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: Akshay Kumar, Taapsee Pannu promote 'Naam Shabana'
Flashback: When sexy models sizzled in bikinis at Tokyo fashion show
Photos: These Indian cities top the list in online purchase of sex products
In pictures: Indian-origin artistes in Hollywood
Photos: Varun Dhawan and Alia Bhatt at studio in Bandra