OBD-II Generic Error Code P2221: How to Fix It

Medium 1–3 hours Medium Severity Verified June 2026
Error Code
P2221
Brand
OBD-II Generic
Product Type
automotive
Severity
Medium
DIY Difficulty
Medium
Estimated Fix Time
1–3 hours
Error code P2221 means your vehicle's onboard computer has detected an intermittent fault in the heater circuit of the Bank 2 NOx (nitrogen oxide) sensor. The NOx sensor heater warms the sensor to operating temperature quickly so it can accurately measure exhaust emissions — when that heater signal drops in and out, the ECM logs P2221. This is a medium-severity code: your engine will likely still run, but emissions performance, fuel economy, and catalytic converter health can all suffer if left unaddressed.
Ad

Tools You'll Need

How to Fix Error Code P2221

  1. Confirm the Code and Note Freeze Frame Data

    Do not clear codes without first recording all stored trouble codes and freeze frame data. You may lose important diagnostic information.
  2. Inspect the NOx Sensor Wiring Harness and Connector (Bank 2)

    Allow the exhaust system to cool completely before touching any components near the NOx sensor. Exhaust parts can exceed 1,000°F and cause serious burns.
  3. Check the NOx Sensor Heater Fuse and Relay

    Never replace a fuse with a higher amperage rating. Doing so can cause wiring fires.
  4. Test the Heater Circuit Voltage and Ground

  5. Measure NOx Sensor Heater Resistance

    Measure resistance only with the sensor connector unplugged and the ignition OFF. Measuring resistance on a live circuit will damage your multimeter.
  6. Inspect and Clean Exhaust System Ground Straps

  7. Replace the Bank 2 NOx Sensor if Faulty

    Apply anti-seize compound to the sensor threads before installation ONLY if the replacement sensor does not come pre-coated. Some pre-coated sensors will be damaged by additional anti-seize.
  8. Clear Codes and Perform a Verification Drive

Parts You May Need

Bank 2 NOx sensor
Check Price on Amazon
NOx sensor wiring harness repair kit or pigtail connector
Check Price on Amazon
Heater circuit fuse (matching OEM amperage)
Check Price on Amazon
Exhaust ground strap
Check Price on Amazon
Bank 2 NOx sensor
Check Price on Amazon
NOx sensor wiring harness repair kit or pigtail connector
Check Price on Amazon
Heater circuit fuse (matching OEM amperage)
Check Price on Amazon
Exhaust ground strap
Check Price on Amazon
Bank 2 NOx sensor
Check Price on Amazon
NOx sensor wiring harness repair kit or pigtail connector
Check Price on Amazon
Heater circuit fuse (matching OEM amperage)
Check Price on Amazon
Exhaust ground strap
Check Price on Amazon
Bank 2 NOx sensor
Check Price on Amazon
NOx sensor wiring harness repair kit or pigtail connector
Check Price on Amazon
Heater circuit fuse (matching OEM amperage)
Check Price on Amazon
Exhaust ground strap
Check Price on Amazon
Ad

When to Call a Professional

You should consult a professional mechanic or emissions specialist if: the fault persists after replacing the NOx sensor and repairing all visible wiring issues; if you find evidence of a short circuit you cannot trace; if the code reappears along with additional sensor codes suggesting an ECM communication fault; or if the vehicle is under emissions warranty (many NOx sensors on diesel vehicles are covered under federal emissions warranties for up to 8 years/80,000 miles). A shop with professional-grade scan tools can perform live NOx sensor output tests and ECM actuator tests that go beyond basic OBD2 scanners.

Frequently Asked Questions

Can I drive my car with a P2221 code?
In most cases, yes — your vehicle will still run with a P2221 code active. However, your check engine light will be on, which will cause you to fail an emissions inspection. Over time, a non-functioning NOx sensor heater can allow inaccurate emissions data to reach the ECM, potentially causing the system to run rich or affect catalytic converter efficiency. It is best to diagnose and repair P2221 within a few weeks rather than ignoring it long-term.
What is the difference between P2221 and P2220?
Both codes relate to the NOx sensor heater circuit, but P2220 refers to Bank 1 (the side of the engine containing cylinder #1) while P2221 refers to Bank 2 (the opposite side). The diagnosis process is identical — only the physical location of the sensor you are testing changes. If both codes appear together, inspect the shared fuse or relay that powers both heater circuits.
How much does it cost to fix a P2221 code?
If the repair is only a wiring issue or a blown fuse, costs can be under $50. A replacement NOx sensor typically costs between $80 and $400 depending on the vehicle make, model, and whether it is an upstream or downstream sensor. Labor at a shop usually adds $75–$150 per hour, making total professional repair costs commonly between $200 and $600. Diesel vehicles with more sophisticated NOx sensor assemblies can be on the higher end of that range.
What causes a NOx sensor heater to fail intermittently?
Intermittent NOx sensor heater faults (as opposed to a complete failure) are most commonly caused by: chafed or heat-damaged wiring that shorts or opens under vibration; corroded connector terminals that lose contact when the harness flexes; a failing ground connection that introduces resistance under load; or an internal heater element that is breaking down and fails only when the sensor reaches a certain temperature. Because the fault is intermittent, the wiggle-test approach on the wiring harness is often the fastest way to isolate the root cause.
Will replacing the NOx sensor always fix P2221?
Not always. Because P2221 is specifically a heater circuit fault, the most common causes are wiring and connector problems rather than sensor failure. Replacing the sensor without first testing the heater voltage supply, ground integrity, and wiring harness condition risks spending money on an unnecessary part. Always perform the electrical circuit tests described in this guide first. If power and ground to the sensor are confirmed good but sensor heater resistance is out of specification, then replacing the sensor is the correct next step.