Most of the recent technologies are turning to mobile platforms, Android becames one of the most widely used OS. Eventhough it has complete features, even it's not safe enough such like Chat Messenger. The security of messages distribution is a challenge to increase of vulnerable distribution of information through the network today. Therefore, a data security or cryptographic algorithm is needed to secure the messages so that it cannot be read by irresponsible people. National Institute of Standard and Technology (NIST) established the Advanced Encrytion Standard (AES) cryptographic algorithm as a standard encryption algorithm that is safe and can be used globally. AES algorithm is included in block cipher cryptography that uses substitution boxes (S-BOX) in its operations, so that algorithmically can make input and output unrelated. So, it can provide more varied output in the process, we need a dynamic S-BOX. In this research, dynamic S-BOX generalized using XOR operations from affine transformations with 8-bit binary element matrices arranged and randomly to produce as many as 256 S-Boxes. The application of dynamic AES with S-BOX algorithm on Android-based messenger chat application is built using the Java programming language and database hierarchy for data storage. The implementation results showed that the algorithm was running well and could encrypt the text of the message to ciphertext and decrypt the ciphertext to the original message. This research can be used as a reference so that further researchers can merge the AES algorithm with other algorithms to improve the security of encryption in text files, documents, images, videos or other types of files.