Abstract Nonsense vs. explicit definition of first lie algebra cohomology $H^1(\mathfrak g, E)$ Context
Many texts introducing a cohomology functor seem to take two approaches:

*

*Saying „take the derived functors of this half-exact functor“ without doing anything explicit or

*Defining $Z, B$ explicitly with seemingly arbitrary definitions trying to avoid the word „functor” or „chain complex” at all costs.

…and Lie algebra cohomology seems to be no exception.  I've never fully understood how these concepts were linked by means of specific examples.

The definitions
I thusly tried to reconcile the following two definitions of $H^1(\mathfrak{g}, E)$, where $\mathfrak{g}$ is a lie algebra over $k$, and $E$ a $\mathfrak{g}$-module. The action shall be denoted by a dot, like in $g.x$.

*

*[P. Etingof, p. 85]: $H^1:=Z^1/G^1$ with
$Z^1 := \{a\in E^\mathfrak{g}\mid x.a(y)-y.a(x)-a([xy])=0\}$ and $B^1:=\{g↦g.v\mid v\in E\}$

*[C. Liese, Def 4.4]
Here we just have $H^n(\mathfrak{g}, E) := \operatorname{Ext}^n_{U\mathfrak{g}}(k, E)$.

My understanding
As far as I understand, in 2. the following is happening:

*

*Since $U\mathfrak{g}$-mod is isomorphic to $\mathfrak{g}$-mod (preserving the structure of an abelian category), we can consider $Ext^n_\mathfrak{g}(k, E)$ as well. In other words, the half-exact functor is $\operatorname{Hom}_\mathfrak{g}(k, -)$: $\mathfrak{g}$-Mod → $\mathfrak{g}$-Mod.

*For this to make sense there needs to be a canonical $\mathfrak{g}$-module structure on $k$. Since we traditionally want this to be our „trivial“ module (think $ℤ$ as the prototypical $ℤG$-module), and $[\mathfrak{g}, \mathfrak{g}]$ always acts trivially on a one-dimensional representation, we should probably make the assumption that $\mathfrak{g}=[\mathfrak{g}\mathfrak{g}]$, i.e. that $\mathfrak{g}$ is perfect (for instance by being semisimple).

*Elements of $\operatorname{Hom}(k, E)$ can be interpreted as elements $v$ of $E$ on which $\mathfrak{g}$ acts trivially, i.e. for which $x.v = 0$ for all $x \in \mathfrak{g}$.

*To get the cohomology functors, we have to take an injective resolution of $E$ and apply our Hom, taking $\operatorname{Ker}/\operatorname{Im}$.

Now, in 1. we see the following:

*

*We can interpret $B^1$ as the image of the inclusion $E\to E^{\mathfrak{g}}$ where $v$ maps to right multiplication $-.v$.

*We can interpret $B^2$ As the kernel of the map $d: E^\mathfrak{g}\to E^{\mathfrak{g}\otimes \mathfrak{g}}$ where $d(a)(x, y) := x.a(y)-y.a(x)+a([xy])$.

But none of these things are actually annihilated by some $\mathfrak{g}$ action, which in all the modlues we introduced happens pointwise!  So they aren't actually elements of $\operatorname{Hom}(k, I^r)$ for injective modules $I^r$!
Question
What am I missing / misunderstanding?
I.e., what is the injective resolution associated to E, making $Z^1=\operatorname{Ker}(d)$ and $B^1=\operatorname{Im}(d)$ after applying a suitable half-exact functor?
 A: Firstly, two comments:

*

*Your definition of $Z^1$ is slightly imprecise.  It should be $$Z^1 = \{a: \mathfrak{g} \to E \mid x \cdot a(y) - y \cdot a(x) - a([x, y]) = 0\}.$$

*Instead of looking for an injective resolution of $E$, use a free resolution of $k$ to compute $\operatorname{Ext}^*_{U\mathfrak{g}}(k, E)$.

We start with the definition of cohomology as derived functors of $\operatorname{Hom}$.  A standard resolution for $k$ is given by $$0 \leftarrow k \leftarrow U\mathfrak{g} \leftarrow U\mathfrak{g} \otimes_k \mathfrak{g} \leftarrow U\mathfrak{g} \otimes_k \Lambda^2 \mathfrak{g} \leftarrow \cdots \leftarrow U\mathfrak{g} \otimes_k \Lambda^p \mathfrak{g} \leftarrow \cdots$$ giving rise to a Chevalley-Eilenberg complex upon applying $\operatorname{Hom}_{U\mathfrak{g}}(-, E)$: $$0 \to \operatorname{Hom}_{U\mathfrak{g}}(U\mathfrak{g}, E) \to \operatorname{Hom}_{U\mathfrak{g}}(U\mathfrak{g} \otimes_k \mathfrak{g}, E) \to \operatorname{Hom}_{U\mathfrak{g}}(U\mathfrak{g} \otimes_k \Lambda^2 \mathfrak{g}, E) \to \cdots.$$  This reduces to $$0 \to E \xrightarrow{d^0} \operatorname{Hom}_k(\mathfrak{g}, E) \xrightarrow{d^1} \operatorname{Hom}_k(\Lambda^2 \mathfrak{g}, E) \to \cdots.$$
I haven't explained what the differentials are, but if you look them up you'll find that they are given by $d^0(v) = (g \mapsto g \cdot v)$ and $d^1(a) = (x \wedge y \mapsto x \cdot a(y) - y \cdot a(x) - a([x,y]))$.  In other words, $\ker d^1 = Z^1$ and $\operatorname{im} d^0 = B^1$ and $H^1 = Z^1 / B^1$ recovers the other more concrete definition you give.
