Can you use XHHW and THWN conductors within the same conduit?
Yes, and nothing in the NEC says otherwise. Mixing insulation types in one raceway is common and legal. The rule people are half remembering is 310.10(G)(1), which requires matching insulation, and that rule applies only to conductors of a parallel set, not to a raceway in general.
The rule that does apply
Section 300.3(C)(1) states that conductors of circuits rated 1000 volts nominal or less shall be permitted to occupy the same equipment wiring enclosure, cable, or raceway where all conductors have an insulation rating equal to at least the maximum circuit voltage applied to any conductor. Since XHHW, XHHW-2, THHN, and THWN-2 are all 600 volt rated building wire, they satisfy this together on any normal 120, 208, 240, 277, or 480 volt system.
Where the differences actually matter
The two insulations are not interchangeable in every location, so check the conditions before you mix them.
THHN is 90 degrees C in dry locations only. THWN-2 is 90 degrees C in both wet and dry. Nearly all building wire sold today is dual marked THHN/THWN-2, so read the print on the jacket instead of assuming from the label on the reel. XHHW is 90 degrees C dry but only 75 degrees C wet. XHHW-2 is 90 degrees C wet and dry. That -2 suffix is the whole story on both types.
This matters because 300.9 says that where raceways are installed in wet locations above grade, the interior of the raceway is a wet location. Underground raceways are also wet locations per the definition in Article 100. So an outdoor or underground pipe needs wet rated conductors throughout, and plain XHHW in that pipe drops to the 75 degree C column of Table 310.16.
Ampacity and derating with mixed types
Each conductor keeps its own ampacity from Table 310.16 based on its own insulation rating. When you apply the ambient correction of 310.15(B) and the adjustment factors of 310.15(C)(1), you start from each conductor's own temperature column. Terminations are the usual limit anyway, because 110.14(C)(1) restricts you to the 60 degree C column at or below 100 amps and the 75 degree C column above 100 amps unless the equipment is listed for higher.
Conduit fill
Fill is calculated per conductor from Chapter 9, Table 5 using each conductor's actual area. XHHW is physically larger than THHN in the same gauge, so a mixed pull will not match an Annex C table entry. Add the areas individually and compare the total to the 40 percent column of Chapter 9, Table 4.
Field takeaway
Mixing XHHW and THWN in one pipe is fine. Confirm every conductor is wet rated if the raceway is outdoors or underground, and compute fill by adding actual conductor areas rather than using Annex C.