An agent-based approach is proposed in this paper to analyze interactions between the emission and electricity markets. A cap-and-trade system is assumed to be in place to regulate emissions from power generation. Generation companies are modeled as adaptive learning agents that can bid strategically into the electricity market by Q-learning algorithm. These companies also participate in allowances trading in the emission market by adjusting their own allowances positions. In the simulation, generation companies can value their generation capacity and available allowances to maximize their profits. The results show that the initial allowance will influence the operation of power producers and that some generation companies may need to raise bid prices to recover their expenses for buying additional allowances. The results also reveal that in some cases generation companies may not increase profits by participating in both markets compared with bidding in the electricity market alone. This modeling framework can help design a sound emission market by simulating market scenarios with different policies, such as allowances caps. It can be also used to investigate the operation strategies for generation companies in such an environment.