This paper reports, for the first time, an implantable, passive wireless biosensor for in situ early detection of periprosthetic joint infection utilizing the magnetoelastic (ME) transduction mechanism combined with antibody-functionalization to target specific types of bacteria. A novel differential sensor configuration is introduced to distinguish the effects of target bacteria from variations caused by the surrounding medium. Differential operation of the sensor was successfully tested for mass detection in various media (air, water, standard 5cSt fluid, and paraffin oil), demonstrating effective elimination of medium effect by subtracting reference sensor outputs. A triangular geometry is adopted for the sensor design, replacing traditional rectangular shapes used in ME immunosensors to enhance the mass sensitivity and facilitate early infection detection. In vitro tests for proof of concept were carried out using single sensors in both rectangular and triangular shapes in E. coli suspension and PBS control solution, and successfully demonstrated a 2.63× improvement in mass sensitivity for the triangular sensors.