Cataract causes more than half of all blindness worldwide. The most effective treatment is surgery, where cataract is often replaced by intraocular lens (IOL). Beyond saving vision, toric IOL implantation is becoming increasingly popular to correct corneal astigmatism. It is important to precisely position and align the axis of IOL during surgery to achieve optimal post-operative astigmatism correction. Comparing with conventional manual marking, automated markerless IOL alignment can be faster, more accurate and non-invasive. Here we propose a framework for computer-assisted intraoperative IOL positioning and alignment based on detection and tracking. Firstly, the iris boundary was segmented and the eye center was determined. A statistical sampling method was developed to segment iris and generate training labels, and both conventional algorithms and deep convolutional neural network (CNN) methods were evaluated. Then, regions of interests (ROIs) containing high density of scleral capillaries were used for tracking eye rotations. Both correlation filter and CNN methods were evaluated for tracking. Cumulative errors during long-term tracking were corrected using a reference image. Validation studies against manual labeling using 7 clinical cataract surgical videos demonstrated that the proposed algorithm achieved an average position error around 0.2 mm, an axis alignment error of 25 FPS, and can be potentially used intraoperatively for markerless IOL positioning and alignment during cataract surgery.