In this paper, we have considered a discrete prey–predator model with square-root functional response and optimal harvesting policy. This type of functional response is used to study the dynamics of the prey–predator model where the prey population exhibits herd behavior, i.e., the interaction between prey and predator occurs along the boundary of the population. The considered population model has three fixed points; one is trivial, the second one is axial and the last one is an interior fixed point. The first two fixed points are always feasible but the last one depends on the parameter value. The interior fixed point experiences the flip and Neimark–Sacker bifurcations depending on the predator harvesting coefficient. Finally, an optimal harvesting policy has been introduced and the optimal value of the harvesting coefficient is determined.