You can leave dead wires in the walls. And by dead I mean not connected to anything on either end. For instance, I upgraded our old two-wire service to the kitchen with modern three-wire cable. I just cut off the old two wire and left it in the walls -- but it wasn't connected to anything and could not be connected to anything.
Any connections with a wire must be made in a box and be accessible. In other words, you cannot drywall over a connection. To the extent you have made a potentially-live wire inaccessible in the ceiling somewhere, you shouldn't do that (I don't know what you mean when you say you "capped off and taped the wire in the ceiling").