We define an obstruction to the formality of a differential graded algebra over a graded operad defined over a commutative ground ring. This obstruction lives in the derived operadic cohomology of the algebra. Moreover, it determines all operadic Massey products induced on the homology algebra, hence the name of derived universal Massey product.