Cooperative communication is a precious approach to overcome the interference of multiuser communication and increase data rate of communication system. Many papers are focused on this issue to achieve more efficiency of relay-based communication in view of QoS parameters. Effective capacity is a desired quality parameter that allows maximum constant data rate with guaranteeing delay. Beam forming coefficients are the main factors of transmitted power from relays and the purpose of the paper is to find maximum effective capacity due to the optimum beam forming coefficients allocated to the best-selected relays in Amplify and Forward (AF) strategy. Minimization of outage probability and transmitted power are the constraints of optimization process to keep the quality requirements. After considering effective capacity maximization and generating optimization problem, Lagrange multipliers are used to gain the optimum answer. Simulation results show that optimal power allocation is achievable using the proposed scheme which causes effective capacity maximization in cooperative communication system. Quantitatively stating, using the proposed method, BER is less than other similar AF or DF (Decode and Forward) cooperative strategies in similar systems. Moreover, the transmitted power is at least 1 dBw less than other efficient methods in larger SNR as shown in simulation results.