Electrical – How to make this wiring inside cabinet safer

electricalwiring

tl;dr: How do I make this wiring meet code, or at least safer?

The pic below is inside one of my kitchen cabinets. Once upon a time the stove was located below these cabinets, and that wire must have run to an exhaust fan (note the metal vent in the pic). The stove had been moved to another spot by the time I bought the house, but the wire is still in the cabinet and still live.

When I bought the house the wire (old 2-wire NM, no ground) ran to a light fixture on the underside of the cabinet, but there was no junction box at all. Just exposed pigtails inside the cabinet. I'd like to improve things here, so what can I do, short of running a brand new wire with a ground through the wall? I figure putting the pigtails in an actual junction box would be a good place to start.

I plan on staying in the house for a few more years, so I'm more concerned with safety than exactly meeting code.

enter image description here

Best Answer

There is nothing you can do with old wiring that doesn't meet code that will make it meet code. Old NM cable with no ground may have been "grandfathered" into an existing building, so long as you don't alter it. But that would not apply here because the WAY it was done was never per code.

Do you really need a circuit there? I would just find out where it comes from and disconnect it there, then pull it out. If you DO want another circuit there, you can attach new NM cable with a ground to the end of this before pulling it out, then get an "old work box" that can be mounted into the wall properly. An old work box is designed to go into a cut-out in the wall, then has "molly bolt" type fasteners that turn behind the wall and snug up against the back of it to hold the box in place (make sure you put the wire through the KO first!). Once the wire is in there, you can put in a receptacle for a light, fan etc.