A substitution box (S-box) serves as the nonlinearity component in a symmetric key encryption scheme; it directly determines the performance and security level of ciphers. Thus, the construction of an S-box with superior performance and efficiency, specifically in terms of high cryptographic properties, is critical. This research proposes a novel method to construct the S-box using the skewed logistic chaotic map and modified Rabin-Karp rolling hash function without disturbing its mathematical structure. First, iterate the skewed logistic map by selecting a seed value and specifying the parameters to generate the chaotic values. The map's sensitivity to initial conditions and parameters results in a seemingly random and unpredictable chaotic values. Second, hash the chaotic values using Rabin-Karp for generating sequences of numbers within a specific range (0–255 for an 8-bit S-box). Then an S-box is constructed using the hash values. Performance evaluations indicate that the S-box produced through our suggested approach exhibits superior performance, demonstrating robust resistance against various security threats, including but not limited to linear attacks, differential attacks, and others. To demonstrate the effectiveness of the constructed S-box, this paper goes on to employ it in an image encryption application. Security analyses reveal that the developed image encryption algorithm successfully encrypts diverse types of images, producing cipher images characterized by uniformly distributed histograms. Performance assessments illustrate its high-security level, surpassing several state-of-the-art encryption algorithms.