Aniline and methylamine both have nitrogen with lone pair of electron. In aniline the phenyl group is electron attracting. It tend to decrease the electron density on nitrogen atom and hence decreases electron releasing tendency of nitrogen. While in methylamine CH3- group is electron repelling in nature. It tends to increase the electron density on the nitrogen atom and helps in electron releasing tendency of nitrogen. So, the aniline is a weaker base than methylamine.
