In this manuscript we present a novel method to design a strong substitution box having important cryptographic properties. Our method is based on chaos and take into account that an S-box can be viewed as a set of Boolean functions. Therefore, we will take advantage of the different characteristics of chaotic functions to generate random Boolean functions with high nonlinearity. Using these Boolean functions, we can create a highly nonlinear S-box. Afterwards, the proposed methodology is analyzed and tested for the following criteria: bijective property, nonlinearity, strict avalanche criterion, output bits independence criterion and equiprobable input/output XOR distribution. Numerical simulation and security analysis demonstrate that the proposed S-box has important cryptographic properties.