In this paper we consider a doubly discrete model used in Dickson and Waters (biASTIN Bulletin 1991; 21:199–221) to approximate the Cramér–Lundberg model. The company controls the amount of dividends paid out to the shareholders as well as the capital injections which make the company never ruin in order to maximize the cumulative expected discounted dividends minus the penalized discounted capital injections. We show that the optimal value function is the unique solution of a discrete Hamilton–Jacobi–Bellman equation by contraction mapping principle. Moreover, with capital injection, we reduce the optimal dividend strategy from band strategy in the discrete classical risk model without external capital injection into barrier strategy, which is consistent with the result in continuous time. We also give the equivalent condition when the optimal dividend barrier is equal to 0. Although there is no explicit solution to the value function and the optimal dividend barrier, we obtain the optimal dividend barrier and the approximating solution of the value function by Bellman's recursive algorithm. From the numerical calculations, we obtain some relevant economical insights. Copyright © 2010 John Wiley & Sons, Ltd.