The utilization of agricultural waste, specifically biochar (BC), as an alternative material to conventional Portland cement offers substantial potential for enhancing sustainability within the construction industry. This study investigates how variations in BC particle size and content affect the properties of cement mortar using Response Surface Methodology (RSM). By manipulating BC’s content and particle size in the mortar mixture and analyzing the data with RSM, this study establishes response surface models to predict the relationship between BC characteristics and cement mortar strength. The results demonstrate that the optimal combination for enhancing the mechanical performance of the mortar is achieved when BC particles have a median particle diameter of 51.08 μm and a content of 2.69% of the mixture. Additionally, utilizing scanning electron microscopy (SEM), it is revealed that BC serves as a nucleation site for cement hydration, thereby inducing a more compact and dense microstructure within the cement mortar. Furthermore, BC particles contribute to enhancing the interfacial transition zone between the cement paste and aggregate, leading to increased compressive strength and fracture toughness of the mortar while simultaneously curbing crack propagation.