We calculate the long-distance effect generated by the four-quark operators with c-quarks in the B→K(∗)ℓ+ℓ− decays. At the lepton-pair invariant masses far below the cˉc-threshold, q2≪4mc2, we use OPE near the light-cone. The nonfactorizable soft-gluon emission from c-quarks is cast in the form of a nonlocal effective operator. The B→K(∗) matrix elements of this operator are calculated from the QCD light-cone sum rules with the B-meson distribution amplitudes. As a byproduct, we also predict the charm-loop contribution to B→K∗γ beyond the local-operator approximation. To describe the charm-loop effect at large q2, we employ the hadronic dispersion relation with ψ=J/ψ,ψ(2S),... contributions, where the measured B→K(∗)ψ amplitudes are used as inputs. Matching this relation to the result of QCD calculation reveals a destructive interference between the J/ψ and ψ(2S) contributions. The resulting charm-loop effect is represented as a q2-dependent correction ΔC9(q2) to the Wilson coefficient C9. Within uncertainties of our calculation, at q2 below the charmonium region the predicted ratio ΔC9(q2)/C9 is ≤5 for B→Kℓ+ℓ−, but can reach as much as 20% for B→K∗ℓ+ℓ−, the difference being mainly caused by the soft-gluon contribution.