Let G=(V,E) be a connected finite graph and Δ be the usual graph Laplacian. Using the calculus of variations and a method of upper and lower solutions, we give various conditions such that the Kazdan–Warner equation Δu=c−he^u has a solution on V, where c is a constant, and h:V→R is a function. We also consider similar equations involving higher order derivatives on graph. Our results can be compared with the original manifold case of Kazdan and Warner (Ann. Math. 99(1):14–47, 1974).