How can I replace a relay with a MOSFET Transistor?
The schematic looks either too complicate or wrong to me. From my understanding, you charge or discharge the coil to make the mech relay work, same thing, you put High or Low voltage on the Gate terminal to make a MOSFET work.

So you can simply connect the emitter of your BJT(BJT can be controlled by your Arduino) to the gate of the N-MOSFET. When there is a High voltage (12V should be fine) on the gate, N-MOSFET act like a closed switch( PMOS work the opposite way). The power adapter should charge the battery. 







simulate this circuit &ndash; Schematic created using CircuitLab

A SPST mech relay could use one NMOS, A SPDT mech relay could use a NMOS and a PMOS, try it to see if it works.