Can I splice wires without a junction box?
Generally no. Section 300.15 requires a box or conduit body to be installed at each outlet, switch point, junction point, and pull point for the connection of conduit, tubing, or cable. A splice buried in a wall cavity, taped up inside a raceway, or tucked above a ceiling with no enclosure is a violation and is one of the most common failures on a rough inspection.
Why the box exists
A box does three jobs at once. It confines any arc or heat from a failed connection to a noncombustible enclosure, it provides mechanical protection so the splice cannot be pulled apart or damaged, and it keeps the connection accessible for inspection and repair. Section 314.29 backs that up by requiring boxes and conduit bodies to be installed so that the wiring inside can be rendered accessible without removing any part of the building or, underground, without excavating.
The exceptions that do exist
Section 300.15 lists specific cases where a box is not required. Equipment with an integral enclosure, such as a luminaire canopy or a listed fixture with an internal wiring compartment, does not need a separate box. Section 300.15(B) permits a fitting identified for the use where a change is made from conduit or tubing to a cable assembly, provided the fitting is accessible after installation. Section 300.15(C) covers direct buried conductors and cables where splices are made with a listed method identified for the purpose, and 300.15(D) permits integral enclosures on listed devices with brackets.
Section 300.15(E) permits a manhole to serve, 300.15(F) permits splices in a metal wireway or auxiliary gutter under 376.56, 300.15(G) permits a cable tray installation where the splice is accessible per 392.56, and 300.15(H) covers cable assemblies where the cable is manufactured with an integral splice compartment. Section 300.15(J) allows luminaires used as raceways to omit a box at the connection.
Direct burial splices in the field
Section 300.5(E) allows a direct buried conductor or cable to be spliced or tapped without the use of splice boxes, provided the splice or tap is made using a method identified for the purpose. That means a listed underground splice kit, either a resin filled kit or a listed heat shrink and gel connector rated for direct burial and wet locations. A wire nut and electrical tape does not qualify, even if you wrap it in a bag.
The Polaris and in wall splice question
Some listed splicing devices are marked for use without a box, and a few product listings cover in wall use in specific configurations. Read the instructions. Section 110.3(B) requires listed and labeled equipment to be installed and used in accordance with any instructions included in the listing or labeling. If the instructions do not state that the device may be installed without a box, you need a box.
If a wall is already closed and a splice is unavoidable, a listed old work box with a blank cover keeps the splice accessible and compliant. Concealing that cover behind drywall converts a legal splice into an illegal one.
Field takeaway
Use a box or a conduit body at every splice unless you can point at the specific exception in 300.15 that covers your situation. Underground, use a listed direct burial splice kit. Never conceal an accessible splice cover behind finish material.