J.J. McCarthy threw two touchdown passes and ran for a score in his return from an ankle injury, leading the Minnesota Vikings to a 27-24 win over the Detroit Lions on Sunday.