A Prime Minister's Office (PMO) release said Modi congratulated the young student and gifted her five books on different religions.
"He congratulated her for the achievement, and said her interest in various religions is an inspiration for all Indians," the release said.
Maryam donated Rs.11,000 each to the Prime Minister's National Relief Fund and the Swachh Bharat Abhiyan.
She was accompanied by her parents Asif Naseem Siddiqui and Farhan Asif Siddiqui.
Maryam had in March topped a competition testing knowledge of the Bhagwad Gita organised by International Society for Krishna Consciousness (ISKCON).
She had bagged the top honour among 4,000 students from 195 schools in Maharashtra who took part in the competition.