In this paper, we consider a qubit in four scenarios: with drive, without drive, and in the presence of dissipation and dephasing, to investigate the quantum violation of the Leggett–Garg inequality (LGI) in an energy constraint. In the case of the energy constraint, we find that under the coarsening measurement in reference and final resolution, the quantum violation of the LGI for the pure qubit is the most robust; on the other hand, the quantum violation of the LGI for the dephasing qubit is the most vulnerable, and the quantum violation of the LGI for driven qubit lies between that of pure qubit and dissipation qubit. Under the coarsening of measurement temporal reference, the quantum violation of the LGI for the pure qubit is more robust than that of the qubit with driven. Moreover, in the case of a qubit that is subjected to driving and is in the presence of dissipation and dephasing, the robustness of quantum violations of the LGI for these scenario systems will become vulnerable, with the driven intensity and the rate of spontaneous emission increasing, respectively, for coarsening measurement both in reference and in final resolution. In addition, in the energy constraint and the projective measurement, the LGI can attain its maximum violation value, 1.5, for the coherent dynamics; while for drive, dissipative and dephasing qubits, the LGI cannot attain the value of 1.5. For systems in the presence of dissipation and dephasing, we find that in the energy constraint, the robustness of the coarsening measurement in final resolution exhibits more vulnerable than that of the coarsening measurement in reference. And for systems with drive and without drive, the robustness of the coarsening measurement in temporal reference is the most robust, and the robustness of the coarsening of measurement final measurement resolution is the most vulnerable.