The Casimir element is dual to the Killing form. (I think. I am somewhat uncertain about this because nobody has ever said this to me, even though it seems like the right thing to say, and frankly I don't know why Lie algebra textbooks don't just say this.) That is, the nondegeneracy of the Killing form is equivalent to its providing an isomorphism $\mathfrak{g} \to \mathfrak{g}^{\ast}$, and writing this isomorphism as a tensor exhibits it as an element of $\mathfrak{g} \otimes \mathfrak{g}$ - precisely the element $\sum e_i \otimes e_i'$ where $e_i$ is a basis. This embeds into $U(\mathfrak{g}) \otimes U(\mathfrak{g})$ and the multiplication map into $U(\mathfrak{g})$ gives the Casimir element.
(Oh good, I see that this is the same definition Akhil gives in the blog post darij linked to above. That makes me feel better.)
Also, you're using the "wrong" definition of the determinant. The exterior powers are all functors, and they take linear maps $T : V \to V$ to linear maps $T : \Lambda^n V \to \Lambda^n V$. Since $\Lambda^n V$ is one-dimensional when $n = \dim V$, the linear maps from $\Lambda^n V$ to itself are canonically isomorphic to the base field $k$. There is also a slightly more transparent definition of the trace: $\text{End}(V)$ is canonically isomorphic to $V^{\ast} \otimes V$, and then one composes with the dual pairing $V^{\ast} \times V \to k$.
It seems to me the notion you're looking for is what general notion of monoidal category supports the definition you're looking at. Traces can be defined in monoidal categories with duals, although I'm not sure what the natural setting for determinants is.
Here is answer (YES) from Alexey Bolsinov who is one the main experts in these questions.
"The answer is YES
There is a very general construction allowing to construct an integrable system on more or less any coadjoint orbit for an arbitrary Lie algebra (non necessarily semisimple). This is a recent paper by Vinberg and Yakimova available in arxiv
http://arxiv.org/abs/math/0511498
Complete families of commuting functions for coisotropic Hamiltonian actions
In the particular case you are talking about (SEMI-SIMPLE g) the positive answer follows from 2 results:
1) the so-called shifts of polynomial invariants give a completely integrable system on a singular adjoint orbit O(b) in a semi simple Lie algebra G if and only if
the index of the centralizer of b coincides with the index of G
(my paper in Izvestija AN SSSR, 1991 and Acta Appl. Math. 1991), both available on my home page
Bolsinov A.V. Commutative families of functions related to consistent Poisson brackets// Acta Appl. Math., 24(1991), pp. 253-274.
I also conjectured that
this condition ind Cent (b) = ind G, in fact, holds true for all singular elements b\in G and checked it for G=sl(n) (in particular for all nilpotent)
2) This conjecture (widely known as Elashvili conjecture) has been proved for an arbitrary semi simple Lie algebra and for all elements (in fact the proof is easily reduced to nilpotent elements)
First, Elashvili did it by, in some sense, straightforward computation which in the most difficult case of e_8 involved some computer program (unpublished)
Recently a conceptual proof has been done by Jean-Yves Charbonnel (IMJ), Anne Moreau (available in arxiv)
http://arxiv.org/abs/1005.0831
The index of centralizers of elements of reductive Lie algebras
To the best of my knowledge, this is the only known universal way to construct an integrable system on an arbitrary orbit.
Remark: I am talking about classical integrable systems, not quantum. These systems can be quantized too, but this is another story.
"
Best Answer
W-algebras appear in at least three interrelated contexts.
Integrable hierarchies, as in the article by Leonid Dickey that mathphysicist mentions in his/her answer. Integrable PDEs like the KdV equation are bihamiltonian, meaning that the equations of motion can be written in hamiltonian form with respect to two different Poisson structures. One of the Poisson structures is constant, whereas the other (the so-called second Gelfand-Dickey bracket) defines a so-called classical W-algebra. For the KdV equation it is the Virasoro Lie algebra, but for Boussinesq and higher-order reductions of the KP hierarchy one gets more complicated Poisson algebras.
Drinfeld-Sokolov reduction, for which you might wish to take a look at the work of Edward Frenkel in the early 1990s. This gives a homological construction of the classical W-algebras starting from an affine Lie algebra and a nilpotent element. You can also construct so-called finite W-algebras in this way, by starting with a finite-dimensional simple Lie algebra and a nilpotent element. The original paper is this one by de Boer and Tjin. A lot of work is going on right on on finite W-algebras. You might wish to check out the work of Premet.
Conformal field theory. This is perhaps the original context and certainly the one that gave them their name. This stems from this paper of Zamolodchikov. In this context, a W-algebra is a kind of vertex operator algebra: the vertex operator algebra generated by the Virasoro vector together with a finite number of primary fields. A review about this aspect of W-algebras can be found in this report by Bouwknegt and Schoutens.
There is a lot of literature on W-algebras, of which I know the mathematical physics literature the best. They had their hey-day in Physics around the late 1980s and early 1990s, when they offered a hope to classify rational conformal field theories with arbitrary values of the central charge. The motivation there came from string theory where you would like to have a good understanding of conformal field theories of $c=15$. The rational conformal field theories without extended symmetry only exist for $c<1$, whence to overcome this bound one had to introduce extra fields (à la Zamolodchikov). Lots of work on W-algebras (in the sense of 3) happened during this time.
The emergence of matrix models for string theory around 1989-90 (i.e., applications of random matrix theory to string theory) focussed attention on the integrable hierarchies, whose $\tau$-functions are intimately related to the partition functions of the matrix model. This gave rise to lots of work on classical W-algebras (in the sense of 1 above) and also to the realisation that they could be constructed à la Drinfeld-Sokolov.
The main questions which remained concerned the geometry of W-algebras, by which one means a geometric realisation of W-algebras analogous to the way the Virasoro algebra is (the universal central extension of) the Lie algebra of vector fields on the circle, and the representation theory. I suppose it's this latter question which motivates much of the present-day W-algebraic research in Algebra.
Added
In case you are wondering, the etymology is pretty prosaic. Zamolodchikov's first example was an operator vertex algebra generated by the Virasoro vector and a primary weight field $W$ of weight 3. People started referring to this as Zamolodchikov's $W_3$ algebra and the rest, as they say, is history.
Added later
Ben's answer motivates the study of finite W-algebras from geometric representation theory and points out that a finite W-algebra can be viewed as the quantisation of a particular Poisson reduction of the dual of the Lie algebra with the standard Kirillov Poisson structure. The construction I mentioned above is in some sense doing this in the opposite order: you first quantise the Kirillov Poisson structure and then you take BRST cohomology, which is the quantum analogue of Poisson reduction.