Nowadays, Internet of Things (IoT) provided smart and inter-connected devices, which are ranging from tiny sensors to complex nodes of Fog and Cloud, communication protocols and several networking technologies. IoT plays a significant role in various application areas such as e-commerce, healthcare, research, governance and so on, and these application easily accessible for end users. Although the IoT has many benefits, there are some security challenges associated with the vulnerabilities presents in this area. This research work introduced a new authentication and access control model using Message Authentication code (MAC) with Elliptical Curve Cryptography (ECC) to address the security issues in Message Queuing Telemetry Transport (MQTT). In cryptography, a message can be authenticated by MAC (i.e. to verify that whether the message came from authenticate sender and the content of the message is changed or not). If any changes occur to the message content, the verifier can able to detect those changes using MAC values, which preserves the authenticity as well as data integrity. The validated results stated that the proposed ECC-MAC-MQTT shows better performance when compared with existing techniques in terms of accuracy, precision, recall and f-measure.