I am creating a circuit which will be used to monitor the discharging of a battery. I can do this using a push button by directly connecting the positive and negative leads directly to the push button however I would like to remove the push button and control the on/off of a circuit such as this with the arduino. I tried transistors but they don't seem to work or maybe I did not configure them correctly.
I can do this using a push button by directly connecting the positive and negative leads directly to the push button
That is an exceptionally bad idea, as the current is limited only by the internal battery resistance. You can destroy the battery and even weld the pushbutton contacts together.
Always use a resistor or other load to control the battery discharge current to safe levels. The battery manufacturer states the maximum discharge current.
A voltage-controlled constant current sink circuit is what you want. If you take a PWM signal and low-pass filter
it to produce an analog voltage, then you can control the circuit from an Arduino.
Figure 1 in this page shows the basic circuit: Nullor - Wikipedia (ignore all the nullor stuff, the circuit diagram is the important point here)
The circuit uses a shunt resistor, Rr, to measure the output current and an opamp+transistor to control
the current according to the control voltage. Rc is not needed. For very large currents a darlington
transistor would be used.
For instance if the shunt resistor is 1 ohm, then a control voltage of 0.5V would mean 0.5A flows to ground
through the transistor and shunt. The transistor dissipates most of the power and will need a good heatsink.
The shunt resistor will probably also need to be sized for the power it dissipates (power = I^2 x R)