Mercury is one of the most toxic heavy metals because it can be accumulated in the human body by the food chain and may induce severe influences on food safety and human health. The detection and removal of mercury are of great importance. Traditional methods have some inherent disadvantages, such as the expensive, time-consuming, and producing secondary pollution. Hence, it is highly desirable to develop novel methods for mercury detection and removal. Protein-based nanomaterials with excellent optical, enzymatic, mechanical, and electronic properties have been developed for mercury detection and removal with high efficiency and selectivity. The reported methods based on protein nanomaterials have allowed the detectability down to nanomolar concentrations or lower levels. The removal efficiency of mercury can reach up to 90 %, proving their practical applications in natural water or food samples. This review highlights the current advances in the nanomaterials constructed from proteins for mercury detection and mercury removal. Furthermore, the current challenges and prospects in this research field are also discussed in-depth to provide an overview for future research directions.