Mugger crocodiles (hereafter called muggers) are the apex predator and keystone species in slow flowing freshwater ecosystem. They play an important role in its functioning by distributing nutrients and increasing primary productivity. Muggers have a sympatric distribution with gharials in the Rapti and Narayani River of Chitwan National Park, but more research and conservation attention has been focused on gharials in Nepal. The inadequate availability of information on the occupied habitats of muggers restrict their evidence-based conservation and management. Therefore, we investigated the ecological factors affecting the habitat selection of muggers and its conservation threats in the Rapti River. We conducted a preliminary survey, followed by a detailed habitat survey, conducted in February and March 2022. During the detailed habitat survey, the pre-defined habitat characteristics were recorded at each station spaced at 500 m intervals along the river as well as the locations where muggers were sighted. We used a generalized linear model (glm) under the binomial family with a logit link function to analyze the factors influencing the habitat selection of muggers. The dependent variable was the presence or absence of muggers at sampling points and the independent variables included: river bank aspect, river width, mid-river depth, river bank substrate type, river bank slope, water current, invasive alien plant species, and anthropogenic disturbances. In addition, a relative whole-site ranking method was employed to determine the most prevalent threats to the mugger. During the survey period, we recorded a total of 46 mugger individuals, 71.8% were observed basking and 28.2% were observed submerged in the river. The highest percentage of muggers (39.1%) was observed on the sandy river bank, followed by the grass and forest bank (19.5%), and clay and sandy bank (15%), respectively. Only the river banks with moderate (15–25°) and moderately steep (25–35°) slopes were found to be the significant factors influencing the occurrence of muggers. Fishing and extraction of river materials, and disposal of garbage and solid waste were ranked as the most prevalent conservation threats. For the long-term conservation of muggers in the Rapti River, effective habitat management plans and strategies are required to control illegal anthropogenic activities such as fishing, sand mining, and boulder quarrying. Research on spatio‐temporal partitioning between mugger and gharials is recommended to understand how resources are shared by the species.