Motivated by Kapranov's discovery of an sh Lie algebra structure on the tangent complex of a Kähler manifold and Chen-Stiénon-Xu's construction of sh Leibniz algebras associated with a Lie pair, we find a general method to construct sh Leibniz algebras. Let A be a commutative dg algebra. Given a derivation of A valued in a dg module Ω, we show that there exist sh Leibniz algebra structures on the dual module of Ω. Moreover, we prove that this process establishes a functor from the category of dg module valued derivations to the category of sh Leibniz algebras over A .