A compact electrohydraulic actuator (C-EHA) is an innovative hydraulic system with a wide range of applications, particularly in automation, robotics, and aerospace. The actuator provides the benefits of hydraulics without the expense and space requirements of full-sized hydraulic systems and in a much cleaner manner. However, this actuator is associated with some disadvantages, such as a high level of nonlinearity, uncertainty, and a lack of studies. The development of a robust controller requires a thorough understanding of the system behavior as well as an accurate dynamic model of the system; however, finding an accurate dynamic model of a system is not always straightforward, and it is considered a significant challenge for engineers, particularly for a C-EHA because the critical parameters inside cannot be accessed. Our research aims to evaluate and confirm the ability of genetic programming (GP) to model a nonlinear system for a C-EHA. In our paper, we present and develop a GP model for the C-EHA system. Furthermore, our study presents a dynamic model of the system for comparison with the GP model. As a result, by using this actuator in the 1-DOF arm system and conducting experiments, we confirmed that the GP model has a better performance with less positional error compared with the proposed dynamic model. The model can be used to conduct further studies, such as designing controllers or system simulations.