Let $\mathfrak g$ be a semisimple Lie algebra and let $M$ be a nontrivial simple $\mathfrak g$-module. Then quadratic Casimir of $\mathfrak g$ acts on $M$ as multiplication by a nonzero scalar $c_M$. We also have representation $\widehat \rho$ of $\mathfrak g$ on cochain spaces $M^n= M \otimes \mathfrak g^{* \otimes n}$. It is defined as the tensor product of $\rho$ and the $n$-fold tensor product of the coadjoint representation. It is simple to show that $\widehat \rho(x)$ commutes with the codifferential for each $x \in \mathfrak g$, hence we have a representation of $\mathfrak g$ on the cohomology groups. It can be shown that each $\widehat \rho(x)$ is chain-homotopic to the zero morphism, so action on cohomology groups happens to be trivial. Some sources claim that the quadratic Casimir $C'$ of modules $(H^p(\mathfrak g,M),\widehat \rho)$ acts as multiplication by $c_M$. Since we have already seen that $\mathfrak g$-action is trivial, this implies that $H^p(\mathfrak g, M)=0$. I don't understand why $C'=c_M$.
Remark: Actually I'm interested in Lie superalgebras, but I will probably be able to work out this case once I learn the argument for ordinary Lie algebras.