The theory of Lie algebras can be categorified starting from a new
notion of `2-vector space', which we define as an internal category in
Vect. There is a 2-category 2Vect having these 2-vector spaces
as objects, `linear functors' as morphisms and `linear natural
transformations' as 2-morphisms. We define a `semistrict Lie
2-algebra' to be a 2-vector space L equipped with a skew-symmetric
bilinear functor [ . , . ] : L x L -> L satisfying
the Jacobi identity up to a completely antisymmetric trilinear
natural transformation called the `Jacobiator', which in turn must
satisfy a certain law of its own. This law is closely related to
the Zamolodchikov tetrahedron equation, and indeed we prove that
any semistrict Lie 2-algebra gives a solution of this equation,
just as any Lie algebra gives a solution of the Yang--Baxter
equation. We construct a 2-category of semistrict Lie 2-algebras
and prove that it is 2-equivalent to the 2-category of 2-term
L_\infty-algebras in the sense of Stasheff. We also study
strict and skeletal Lie 2-algebras, obtaining the former from
strict Lie 2-groups and using the latter to classify Lie
2-algebras in terms of 3rd cohomology classes in Lie algebra
cohomology. This classification allows us to construct for any
finite-dimensional Lie algebra g a canonical 1-parameter
family of Lie 2-algebras g_h which reduces to g at
h = 0. These are closely related to the 2-groups G_h
constructed in a companion paper.