Quantum networks provide a prospective paradigm to connect separated quantum nodes, which relies on the distribution of long-distance entanglement and active feedforward control of qubits between remote nodes. Such approaches can be utilized to construct nonlocal quantum gates, forming building blocks for distributed quantum computing and other novel quantum applications. However, these gates have only been realized within single nodes or between nodes separated by a few tens of meters, limiting the ability to harness computing resources in large-scale quantum networks. Here, we demonstrate nonlocal photonic quantum gates between two nodes spatially separated by 7.0 km using stationary qubits based on multiplexed quantum memories, flying qubits at telecom wavelengths, and active feedforward control based on field-deployed fibers. Furthermore, we illustrate quantum parallelism by implementing the Deutsch-Jozsa algorithm and the quantum phase estimation algorithm between the two remote nodes. These results represent a proof-of-principle demonstration of quantum gates over metropolitan-scale distances and lay the foundation for the construction of large-scale distributed quantum networks relying on existing fiber channels.