In this paper, a new four-dimensional (4D) chaotic system which contains an active flux-controlled memristor characterized with a smooth continuous cubic nonlinearity is introduced. The objective is to obtain a 4D chaotic system which contains quadratic terms by using the memristor model which is designed as a new cubic emulator. A new chaotic circuit equation is obtained by using this emulator. The chaotic behavior of the system is observed both theoretically and graphically. The fundamental dynamics of the chaotic system are examined by using equilibrium points, phase portraits, Lyapunov exponents and bifurcation diagrams. The proportional-integral-derivative (PID) control design obtained using optimization algorithms is presented for memristor-based chaotic system. Firefly algorithm and genetic algorithm are used in PID control design for obtaining optimal PID controller gains that provides optimization between master and slave circuits. To verify system performance, this proposed PID-based chaotic circuit is used to communicate communication systems. Experimental results of this system are obtained and presented in real time.