A relative Rota–Baxter algebra is a triple (A, M, T) consisting of an algebra A, an A-bimodule M, and a relative Rota–Baxter operator T. Using Voronov’s derived bracket and a recent work of Lazarev, Sheng, and Tang, we construct an L∞[1]-algebra whose Maurer–Cartan elements are precisely relative Rota–Baxter algebras. By a standard twisting, we define a new L∞[1]-algebra that controls Maurer–Cartan deformations of a relative Rota–Baxter algebra (A, M, T). We introduce the cohomology of a relative Rota–Baxter algebra (A, M, T) and study infinitesimal deformations in terms of this cohomology (in low dimensions). As an application, we deduce cohomology of triangular skew-symmetric infinitesimal bialgebras and discuss their infinitesimal deformations. Finally, we define homotopy relative Rota–Baxter operators and find their relationship with homotopy dendriform algebras and homotopy pre-Lie algebras.