Let (Σ,g) be a compact Riemann surface with smooth boundary ∂Σ, Δg be the Laplace-Beltrami operator, and h be a positive smooth function. Using a min-max scheme introduced by Djadli-Malchiodi (2006) and Djadli (2008), we prove that if Σ is non-contractible, then for any ρ∈(8kπ,8(k+1)π) with k∈N∗, the mean field equation {Δgu=ρ∫Σheudvgheuu=0inonΣ∂Σ has a solution. This generalizes earlier existence results of Ding-Jost-Li-Wang (1999) and Chen-Lin (2003) in the Euclidean domain. Also we consider the corresponding Neumann boundary value problem. If h is a positive smooth function, then for any ρ∈(4kπ,4(k+1)π) with k∈N∗, the mean field equation ⎩⎨⎧Δgu=ρ(∫Σheudvgheu−∣Σ∣1)∂u/∂v=0inonΣ∂Σ has a solution, where v denotes the unit normal outward vector on ∂Σ. Note that in this case we do not require the surface to be non-contractible.