This paper is concerned with a PDE approach to horizontally quasiconvex (h-quasiconvex) functions in the Heisenberg group based on a nonlinear second order elliptic operator. We discuss sufficient conditions and necessary conditions for upper semicontinuous, h-quasiconvex functions in terms of the viscosity subsolution to the associated elliptic equation. Since the notion of h-quasiconvexity is equivalent to the horizontal convexity (h-convexity) of the function's sublevel sets, we further adopt these conditions to study the h-convexity preserving property for horizontal curvature flow in the Heisenberg group. Under the comparison principle, we show that the curvature flow starting from a star-shaped h-convex set preserves the h-convexity during the evolution.