Conventional superconducting flux qubits require the application of a precisely tuned magnetic field to set the operation point at half a flux quantum through the qubit loop, which complicates the on-chip integration of this type of device. It has been proposed that by inducing a π-phase shift in the superconducting order parameter using a precisely controlled nanoscale-thickness superconductor/ferromagnet/superconductor Josephson junction, commonly referred to as π-junction, it is possible to realize a flux qubit operating at zero magnetic flux. Here, we report the realization of a zero-flux-biased flux qubit based on three NbN/AlN/NbN Josephson junctions and a NbN/PdNi/NbN ferromagnetic π-junction. The qubit lifetime is in the microsecond range, which we argue is limited by quasiparticle excitations in the metallic ferromagnet layer. Our results pave the way for developing quantum coherent devices, including qubits and sensors, that utilize the interplay between ferromagnetism and superconductivity.