In this paper, we use the key parameters data set of the Neutral Gas and Ion Mass Spectrometer from the Mars Atmosphere and Volatile Evolution (MAVEN) mission. The particle density profiles of electrons, CO2+/N2+, CO+, O2+, O+, NO+, O2 and O from 90 to 500 km have been deduced by adopting the Chapman modeling methodology. The correlation of the peak density/altitude with the solar zenith angle, the changes in the profile of the Martian ionosphere during solar flares, and the effects of Martian dust storms are analyzed. The results exhibit a positive/negative correlation between the peak density/altitude of the M2 layer and the solar zenith angle. Within the MAVEN observational record available, only three C-Class flares occurred on 26 August 2016, 29 November 2020, and 26 August 2021. The analysis reveals during these solar flare events, the electron density of the M2 layer above 200 km increases obviously. The peak density of M1 increases by 33.4%, 13.2% and 7.4%, while the peak height decreases by 0.1%, 10.2% and 4.4%, respectively. The Martian dust storm causes the peak height of the M2 layer to increase by 19.5 km, and the peak density to decrease by 4.2 × 109 m−3. Our study shows that the Martian ionosphere is similar to the Earth’s, which is of great significance for understanding the planetary ionosphere.