In Weibel's *An Introduction to Homological Algebra*, the Chevalley-Eilenberg complex of a Lie algebra $g$ is defined as $\Lambda^\*(g) \otimes Ug$ where $Ug$ is the universal enveloping algebra of $g$. The differential here has degree -1.


I have been told that the Chevalley-Eilenberg complex for $g$ is 
 $C^\*(g) = \text{Sym}(g^\*[-1])$,
the free graded commutative algebra on the vector space dual of $g$ placed in degree 1. The bracket $[,]$ is a map $\Lambda^2 g \to g$ so its dual $d : = [,]\* \colon g^\* \to \Lambda^2 g^\*$ is a map from $C^1(g) \to C^2(g)$. Since $C^\*(g)$ is free, this defines a derivation, also called $d$, from $C^\*(g)$ to itself. This derivation satisfies $d^2 = 0$ precisely because $[,]$ satisfies the Jacobi identity.


Finally, Kontsevich and Soibelman in *Deformation Theory I* leave it as an exercise to construct the Chevalley-Eilenberg complex in analogy to the way that the Hochschild complex is constructed for an associative algebra by considering formal deformations.


The first is a chain complex, the second a cochain complex, and what do either have to do with formal deformations of $g$?



Chevalley Eilenberg complex definitions?
The first complex, from Weibel, is a projective resolution of the trivial $\mathfrak g$-module $k$ as a $\mathcal U(\mathfrak g)$-module; I am sure Weibel says so!


Your second complex is obtained from the first by applying the functor $\hom\_{\mathcal U(\mathfrak g)}(\mathord-,k)$, where $k$ is the trivial $\mathfrak g$-module. It therefore computes $\mathrm{Ext}\_{\mathcal U(\mathfrak g)}(k,k)$, also known as $H^\bullet(\mathfrak g,k)$, the Lie algebra cohomology of $\mathfrak g$ with trivial coefficients.


The connection with deformation theory is explained at length in Gerstenhaber, Murray; Schack, Samuel D. Algebraic cohomology and deformation theory. Deformation theory of algebras and structures and applications (Il Ciocco, 1986), 11--264, NATO Adv. Sci. Inst. Ser. C Math. Phys. Sci., 247, Kluwer Acad. Publ., Dordrecht, 1988.


In particular neither of your two complexes 'computes' deformations: you need to take the projective resolution $\mathcal U(\mathfrak g)\otimes \Lambda^\bullet \mathfrak g$, apply the functor $\hom\_{\mathcal U(\mathfrak g)}(\mathord-,\mathfrak g)$, where $\mathfrak g$ is the adjoint $\mathfrak g$-module, and compute cohomology to get $H^\bullet(\mathfrak g,\mathfrak g)$, the Lie algebra cohomology with coefficients in the adjoint representation. Then $H^2(\mathfrak g,\mathfrak g)$ classifies infinitesimal deformations, $H^3(\mathfrak g,\mathfrak g)$ is the target for obstructions to extending partial deformations, and so on, exactly along the usual yoga of formal deformation theory à la Gerstenhaber.


By the way, the original paper [Chevalley, Claude; Eilenberg, Samuel
Cohomology theory of Lie groups and Lie algebras.
Trans. Amer. Math. Soc. 63, (1948). 85--124.] serves as an incredibly readable introduction
to Lie algebra cohomology.


