We study the derived representation scheme DRep_n(A) parametrizing the n-dimensional representations of an associative algebra A over a field of characteristic zero. We show that the homology of DRep_n(A) is isomorphic to the Chevalley-Eilenberg homology of the current Lie coalgebra gl_n^*(C) defined over a Koszul dual coalgebra of A. We extend this isomorphism to representation schemes of Lie algebras: for a finite-dimensional reductive Lie algebra g, we define the derived affine scheme DRep_g(a) parametrizing the representations (in g) of a Lie algebra a; we show that the homology of DRep_g(a) is isomorphic to the Chevalley-Eilenberg homology of the Lie coalgebra g^*(C), where C is a cocommutative DG coalgebra Koszul dual to the Lie algebra a. We construct a canonical DG algebra map \Phi_g(a) : DRep_g(a)^G -> DRep_h(a)^W, which is a homological extension of the classical restriction homomorphism. We call \Phi_g(a) a derived Harish-Chandra homomorphism. We conjecture that, for a two-dimensional abelian Lie algebra a, the derived Harish-Chandra homomorphism is a quasi-isomorphism, and provide some evidence for this conjecture. For any complex Lie algebra g, we compute the Euler characteristic of DRep_g(a)^G in terms of matrix integrals over G and compare it to the Euler characteristic of DRep_h(a)^W.This yields an interesting combinatorial identity, which we prove for gl_n and sl_n (for all n). Our identity is analogous to the classical Macdonald identity, and our quasi-isomorphism conjecture is analogous to the strong Macdonald conjecture proved by S.Fishel, I.Grojnowski and C.Teleman. We explain this analogy by giving a new homological interpretation of Macdonald's conjectures in terms of derived representation schemes, parallel to our Harish-Chandra quasi-isomorphism conjecture.