In general, implementing a multi-logical-qubit gate by manipulating quantum states in a decoherence-free subspace (DFS) becomes more complex and difficult when increasing the number of logical qubits. In this work, we propose a novel idea to realize quantum gates by manipulating quantum states outside their DFS but having the states of the logical qubits remain in their DFS before and after the gate operation. This proposal has the following features: (i) Because the states are manipulated outside the DFS, the multi-qubit gate implementation can be simplified when compared to realizing a multiqubit gate via manipulating quantum states within the DFS, which usually requires unitary operations over a large DFS; and (ii) Because the states of the logical qubits return to the DFS after the gate operation, the errors caused by decoherence during the gate operation are not accumulated for a long-running calculation, and the states of the logical qubits are immune to decoherence when they are stored. Based on this proposal, we then present a way for realizing a multi-target-qubit controlled NOT gate using logical qubits encoded in a decoherence-free subspace (DFS) against collective dephasing. This gate is realized by employing qutrits (three-level quantum systems) placed in a cavity or coupled to a resonator. This proposal has the following advantages: (i) The states of the logical qubits return to their DFS after the gate operation; (ii) The gate can be implemented with only a few basic operations; (iii) The gate operation time is independent of the number of logical qubits; (iv) This gate can be deterministically implemented because no measurement is needed; (v) The intermediate higher-energy level for all qutrits is not occupied during the entire operation, thus decoherence from this level is greatly suppressed; and (vi) This proposal is universal and can be applied to realize the proposed gate using natural atoms or artificial atoms (e.g., quantum dots, NV centers, and various superconducting qutrits, etc.) placed in a cavity or coupled to a resonator. As an application, we also show how to apply this gate to create a Greenberger-Horne-Zeilinger (GHZ) entangled state of multiple logical qubits encoded in DFS, and further investigate the experimental feasibility for creating the GHZ state of three logical qubits in the DFS, by using six superconducting transmon qutrits coupled to a one-dimensional coplanar waveguide resonator.