Based on a cavity-assisted interaction by single-photon pulses, we propose a scheme to implement a two-qubit Grover search in a distributed quantum network, with qubits encoded in pairs of atoms in a dephasing-free subspace (DFS), which could strongly suppress collective dephasing errors and would be helpful for enhancing the fidelity of implementation. Moreover, we show that the preparation of entangled states and transfer of quantum states can be completed in our improved scheme, which is very important for the compatibility and scalability of the quantum network.