The skin barrier is provided by the organized multi-layer structure of epidermal cells, which is dynamically maintained by a continuous supply of cells from the basal layer. The epidermal homeostasis can be disrupted by various skin diseases, which often cause morphological changes not only in the epidermis but in the dermis. We present a three-dimensional agent-based computational model of the epidermis that takes into account the deformability of the dermis. Our model can produce a stable epidermal structure with well-organized layers. We show that its stability depends on the cell supply rate from the basal layer. Modeling the morphological change of the dermis also enables us to investigate how the stiffness of the dermis affects the structure and barrier functions of the epidermis. Besides, we show that our model can simulate the formation of a corn (clavus) by assuming hyperproliferation and rapid differentiation. We also provide experimental data for human corn, which supports the model assumptions and the simulation result.