We study deformations of N = 4 supersymmetric Yang-Mills theory with space-time dependent couplings by embedding probe D3-branes in supergravity backgrounds with non-trivial fluxes. The effective action on the world-volume of the D3-branes is analyzed and a map between the deformation parameters and the fluxes is obtained. As an explicit example, we consider D3-branes in a background corresponding to (p, q) 5-branes intersecting them and show that the effective theory on the D3-branes precisely agrees with the supersymmetric Janus configuration found by Gaiotto and Witten in [1]. D3-branes in an intersecting D3-brane background is also analyzed and the D3-brane effective action reproduces one of the supersymmetric configurations with ISO(1, 1) × SO(2) × SO(4) symmetry found in our previous paper [2].