  The null energy condition (NEC) is a fundamental principle in general
relativity, and its violation could leave discernible signatures in
gravitational waves (GWs). A violation of the NEC during the primordial era
would imprint a blue-tilted spectrum on the stochastic gravitational wave
background (SGWB) at nanohertz frequencies, potentially accounting for the
recently detected signal by pulsar timing arrays. Remarkably, models of NEC
violation during inflation also predict a nearly scale-invariant GW spectrum in
the millihertz frequency range, which could be detectable by upcoming
space-based GW detectors such as Taiji. The observation of this distinctive
spectrum would provide compelling evidence for new physics beyond the standard
cosmological paradigm. In this study, we explore Taiji's ability to detect an
SGWB arising from NEC violation during inflation, considering various
foregrounds and noise sources, including an extragalactic foreground from
binary black hole mergers throughout the universe, a galactic foreground from
white dwarf binaries, and the intrinsic noise of the Taiji detector. Employing
comprehensive Bayesian parameter estimation techniques to analyze simulated
Taiji data, we demonstrate a remarkable precision improvement of three orders
of magnitude compared to the NANOGrav 15-year data set for measuring the tensor
power spectrum amplitude, $P_{T,2}$, during the second inflationary stage. This
substantial enhancement in measurement capabilities underscores Taiji's
potential as a powerful probe for investigating the NEC violation in the early
Universe.
