We have developed superconducting qubits based on NbN/AlN/NbN epitaxial Josephson junctions on Si substrates which promise to overcome the drawbacks of qubits based on Al/AlOx/Al junctions. The all-nitride qubits have great advantages such as chemical stability against oxidation (resulting in fewer two-level fluctuators), feasibility for epitaxial tunnel barriers (further reducing energy relaxation and dephasing), and a larger superconducting gap of ~ 5.2 meV for NbN compared to ~ 0.3 meV for Al (suppressing the excitation of quasiparticles). Replacing conventional MgO by a Si substrate with a TiN buffer layer for epitaxial growth of nitride junctions, we demonstrate a qubit energy relaxation time \({T}_{1}=16.3 {\mu }\text{s}\) and a spin-echo dephasing time \({T}_{2}=21.5 {\mu }\text{s}\). These significant improvements in quantum coherence are explained by the reduced dielectric loss compared to previously reported NbN-based qubits with MgO substrates (\({T}_{1}\approx {T}_{2}\approx 0.5 {\mu }\text{s}\)). These results are an important step towards constructing a new platform for superconducting quantum hardware.