In June 1975, Prime Minister Indira Gandhi declared a state of emergency in India which lasted until 1977. During this period, many of her political opponents were jailed and opposition groups were banned. Modi was appointed general secretary of the “Gujarat Lok Sangharsh Samiti”, an RSS committee coordinating opposition to the Emergency in Gujarat. Shortly afterwards, the RSS was banned. Modi was forced to go underground in Gujarat and frequently travelled in disguise to avoid arrest. He became involved in printing pamphlets opposing the government, sending them to Delhi and organising demonstrations. Modi was also involved with creating a network of safe houses for individuals wanted by the government, and in raising funds for political refugees and activists. During this period, Modi wrote a book in Gujarati, Sangharsh Ma Gujarat (In The Struggles of Gujarat), describing events during the Emergency. Among the people he met in this role was trade unionist and socialist activist George Fernandes, as well as several other national political figures. In his travels during the Emergency, Modi was often forced to move in disguise, once dressing as a monk, and once as a Sikh.
Modi became an RSS sambhag pracharak (regional organiser) in 1978, overseeing RSS activities in the areas of Surat and Vadodara, and in 1979 he went to work for the RSS in Delhi, where he was put to work researching and writing the RSS’s version of the history of the Emergency.He returned to Gujarat a short while later, and was assigned by the RSS to the BJP in 1985. In 1987 Modi helped organise the BJP’s campaign in the Ahmedabad municipal election, which the BJP won comfortably; Modi’s planning has been described as the reason for that result by biographers. After L. K. Advani became president of the BJP in 1986, the RSS decided to place its members in important positions within the BJP; Modi’s work during the Ahmedabad election led to his selection for this role, and Modi was elected organising secretary of the BJP’s Gujarat unit later in 1987.
Modi rose within the party and was named a member of the BJP’s National Election Committee in 1990, helping organise L. K. Advani’s 1990 Ram Rath Yatra in 1990 and Murli Manohar Joshi’s 1991–92 Ekta Yatra (Journey for Unity). However, he took a brief break from politics in 1992, instead establishing a school in Ahmedabad; friction with Shankersingh Vaghela, a BJP MP from Gujarat at the time, also played a part in this decision. Modi returned to electoral politics in 1994, partly at the insistence of Advani, and as party secretary, Modi’s electoral strategy was considered central to the BJP victory in the 1995 state assembly elections. In November of that year Modi was elected BJP national secretary and transferred to New Delhi, where he assumed responsibility for party activities in Haryana and Himachal Pradesh. The following year, Shankersinh Vaghela, a prominent BJP leader from Gujarat, defected to the Indian National Congress (Congress, INC) after losing his parliamentary seat in the Lok Sabha elections. Modi, on the selection committee for the 1998 Assembly elections in Gujarat, favoured supporters of BJP leader Keshubhai Patel over those supporting Vaghela to end factional division in the party. His strategy was credited as key to the BJP winning an overall majority in the 1998 elections,and Modi was promoted to BJP general secretary (organisation) in May of that year.